auth: SSOログイン後の画面遷移とユーザー表示を修正

- コールバック成功時のリダイレクト先をWEB_ORIGINルートから
  /dashboardに変更(ランディングで止まらないように)
- ルートページでログイン済みならダッシュボードへ自動遷移
- サイドバーのユーザーカードをOIDC identityの表示名・メールに変更し、
  未ログイン時のみSSOログインリンクを表示
- demoヘッダ(x-demo-user)はdemoモード時のみ送信
This commit is contained in:
amania-jailbreak
2026-08-05 16:07:10 +09:00
parent 03440d269d
commit f9ce4b218e
4 changed files with 39 additions and 5 deletions
+2 -1
View File
@@ -116,7 +116,8 @@ export async function registerAuthRoutes(app: FastifyInstance, appConfig: AppCon
reply.clearCookie(stateCookie, { path: "/auth" });
reply.clearCookie(verifierCookie, { path: "/auth" });
reply.clearCookie(nonceCookie, { path: "/auth" });
return reply.redirect(appConfig.WEB_ORIGIN);
// SSO成功後はランディングではなく管理ダッシュボードへ直接向かう。
return reply.redirect(`${appConfig.WEB_ORIGIN.replace(/\/$/, "")}/dashboard`);
});
app.get("/auth/logout", async (_request, reply) => {