From 673f556fb3aa08ecfa6b6bd00afd1bd616768009 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 1 Feb 2026 00:16:58 +0200 Subject: [PATCH] fix: more rabbit nitpicks --- frontend/src/pages/authorize-page.tsx | 6 +++--- frontend/src/pages/login-page.tsx | 4 ++++ frontend/src/schemas/oidc-schemas.ts | 2 +- internal/controller/oidc_controller.go | 10 +++++++++- internal/controller/oidc_controller_test.go | 2 ++ internal/service/oidc_service.go | 10 ++++++++-- 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/authorize-page.tsx b/frontend/src/pages/authorize-page.tsx index ede9a24..eac8929 100644 --- a/frontend/src/pages/authorize-page.tsx +++ b/frontend/src/pages/authorize-page.tsx @@ -10,7 +10,7 @@ import { CardFooter, CardContent, } from "@/components/ui/card"; -import { getOidcClientInfoScehma } from "@/schemas/oidc-schemas"; +import { getOidcClientInfoSchema } from "@/schemas/oidc-schemas"; import { Button } from "@/components/ui/button"; import axios from "axios"; import { toast } from "sonner"; @@ -73,13 +73,13 @@ export const AuthorizePage = () => { isOidc, compiled: compiledOIDCParams, } = useOIDCParams(searchParams); - const scopes = props.scope.split(" "); + const scopes = props.scope ? props.scope.split(" ").filter(Boolean) : []; const getClientInfo = useQuery({ queryKey: ["client", props.client_id], queryFn: async () => { const res = await fetch(`/api/oidc/clients/${props.client_id}`); - const data = await getOidcClientInfoScehma.parseAsync(await res.json()); + const data = await getOidcClientInfoSchema.parseAsync(await res.json()); return data; }, enabled: isOidc, diff --git a/frontend/src/pages/login-page.tsx b/frontend/src/pages/login-page.tsx index c93b5e5..92a5656 100644 --- a/frontend/src/pages/login-page.tsx +++ b/frontend/src/pages/login-page.tsx @@ -149,6 +149,10 @@ export const LoginPage = () => { [], ); + if (isLoggedIn && isOidc) { + return ; + } + if (isLoggedIn && props.redirect_uri !== "") { return (