1
0
forked from baron/baron-sso

devfront 개발모드 unkown로그인 제거

This commit is contained in:
2026-06-19 08:15:07 +09:00
parent 7ea385a9f4
commit 016d783482
11 changed files with 162 additions and 34 deletions

View File

@@ -2,6 +2,7 @@ import { useEffect } from "react";
import { useAuth } from "react-oidc-context";
import { useNavigate } from "react-router-dom";
import { userManager } from "../../lib/auth";
import { isValidOidcSessionUser } from "../../lib/oidcStorage";
export default function AuthCallbackPage() {
const auth = useAuth();
@@ -16,7 +17,7 @@ export default function AuthCallbackPage() {
return;
}
if (auth.isAuthenticated) {
if (auth.isAuthenticated && isValidOidcSessionUser(auth.user)) {
const returnTo =
typeof auth.user?.state === "object" &&
auth.user?.state !== null &&
@@ -29,7 +30,7 @@ export default function AuthCallbackPage() {
console.error("Auth Error:", auth.error);
navigate("/login", { replace: true });
}
}, [auth.isAuthenticated, auth.error, navigate, auth.user?.state]);
}, [auth.isAuthenticated, auth.error, navigate, auth.user]);
return <div>Loading Auth...</div>;
}