1
0
forked from baron/baron-sso

style: fix formatting issues caught by biome in adminfront

This commit is contained in:
2026-04-21 17:11:08 +09:00
parent 4427ab1f85
commit 7f955e2122
6 changed files with 44 additions and 19 deletions

View File

@@ -11,7 +11,7 @@ function AuthCallbackPage() {
console.debug("[AuthCallbackPage] State:", {
isAuthenticated: auth.isAuthenticated,
isLoading: auth.isLoading,
error: auth.error
error: auth.error,
});
if (auth.isAuthenticated) {
// Save token to localStorage for existing API clients that might still use it
@@ -26,7 +26,10 @@ function AuthCallbackPage() {
typeof auth.user.state.returnTo === "string"
? auth.user.state.returnTo
: "/";
console.info("[AuthCallbackPage] Auth successful, navigating to", returnTo);
console.info(
"[AuthCallbackPage] Auth successful, navigating to",
returnTo,
);
navigate(returnTo, { replace: true });
} else if (auth.error) {
console.error("[AuthCallbackPage] Auth Error:", auth.error);

View File

@@ -23,10 +23,13 @@ function LoginPage() {
console.debug("[LoginPage] Auth state check:", {
isAuthenticated: auth.isAuthenticated,
isLoading: auth.isLoading,
returnTo
returnTo,
});
if (auth.isAuthenticated) {
console.info("[LoginPage] User is authenticated, redirecting to", returnTo);
console.info(
"[LoginPage] User is authenticated, redirecting to",
returnTo,
);
navigate(returnTo, { replace: true });
}
}, [auth.isAuthenticated, navigate, returnTo, auth.isLoading]);