From 99def9a0e55aa9a3b8da965e1c02c90f208ac0bb Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 18 Mar 2026 13:32:09 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.sample | 2 +- devfront/src/app/routes.tsx | 2 +- devfront/src/lib/apiClient.ts | 2 +- devfront/src/lib/auth.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index 5734649e..1dce7295 100644 --- a/.env.sample +++ b/.env.sample @@ -59,7 +59,7 @@ ADMIN_PASSWORD=adminPasswordIsNotSimple USERFRONT_URL=https://sso.hmac.kr # Services proxied via Nginx -BACKEND_URL=${USERFRONT_URL}/api +BACKEND_URL=${USERFRONT_URL} OATHKEEPER_PUBLIC_URL=${USERFRONT_URL} # ory-stack 변수들 diff --git a/devfront/src/app/routes.tsx b/devfront/src/app/routes.tsx index 0a8c81d8..1586062e 100644 --- a/devfront/src/app/routes.tsx +++ b/devfront/src/app/routes.tsx @@ -17,7 +17,7 @@ export const router = createBrowserRouter( element: , }, { - path: "/callback", + path: "/auth/callback", element: , }, { diff --git a/devfront/src/lib/apiClient.ts b/devfront/src/lib/apiClient.ts index 1d231cb1..49b83cee 100644 --- a/devfront/src/lib/apiClient.ts +++ b/devfront/src/lib/apiClient.ts @@ -29,7 +29,7 @@ apiClient.interceptors.response.use( async (error) => { if (error.response?.status === 401) { // 401 발생 시 로그인 페이지로 리다이렉트 - const isAuthPath = window.location.pathname.startsWith("/callback"); + const isAuthPath = window.location.pathname.startsWith("/auth/callback"); const isLoginPath = window.location.pathname === "/login"; const user = await userManager.getUser(); // 인증 토큰이 없는 경우에만 로그인으로 보낸다. diff --git a/devfront/src/lib/auth.ts b/devfront/src/lib/auth.ts index 59670a04..f424d9d9 100644 --- a/devfront/src/lib/auth.ts +++ b/devfront/src/lib/auth.ts @@ -5,11 +5,11 @@ export const oidcConfig: AuthProviderProps = { authority: import.meta.env.VITE_OIDC_AUTHORITY || "http://localhost:5000/oidc", // Gateway Proxy URL client_id: import.meta.env.VITE_OIDC_CLIENT_ID || "devfront", - redirect_uri: `${window.location.origin}/callback`, + redirect_uri: `${window.location.origin}/auth/callback`, response_type: "code", scope: "openid offline_access profile email", // offline_access for refresh token post_logout_redirect_uri: window.location.origin, - popup_redirect_uri: `${window.location.origin}/callback`, + popup_redirect_uri: `${window.location.origin}/auth/callback`, userStore: new WebStorageStateStore({ store: window.localStorage }), automaticSilentRenew: true, };