From c4b6c698e0305cd1b410cc3b16f0cfc9dfabbacb Mon Sep 17 00:00:00 2001 From: Ricky Date: Mon, 15 Jun 2026 15:51:33 +0800 Subject: [PATCH] feat(oidc): support nonce passthrough --- src/api/user.ts | 1 + src/component/Pages/Login/Authorize.tsx | 1 + src/component/Pages/Login/Signin/SignIn.tsx | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/api/user.ts b/src/api/user.ts index ab337f454..351df7dc3 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -225,6 +225,7 @@ export interface GrantService { redirect_uri: string; state: string; scope: string; + nonce?: string; code_challenge?: string; code_challenge_method?: string; } diff --git a/src/component/Pages/Login/Authorize.tsx b/src/component/Pages/Login/Authorize.tsx index 6f65d8d42..acac01d94 100644 --- a/src/component/Pages/Login/Authorize.tsx +++ b/src/component/Pages/Login/Authorize.tsx @@ -10,6 +10,7 @@ const Authorize = () => { redirectUri: query.get("redirect_uri") || "", state: query.get("state") || "", scope: query.get("scope") || "", + nonce: query.get("nonce") || undefined, codeChallenge: query.get("code_challenge") || undefined, codeChallengeMethod: query.get("code_challenge_method") || undefined, }; diff --git a/src/component/Pages/Login/Signin/SignIn.tsx b/src/component/Pages/Login/Signin/SignIn.tsx index 36edcf536..df1b8cc72 100644 --- a/src/component/Pages/Login/Signin/SignIn.tsx +++ b/src/component/Pages/Login/Signin/SignIn.tsx @@ -64,6 +64,7 @@ export interface OAuthConsentProps { redirectUri: string; state: string; scope: string; + nonce?: string; codeChallenge?: string; codeChallengeMethod?: string; } @@ -133,6 +134,7 @@ const EmailLogin = ({ oauthConsent }: SignInProps) => { redirect_uri: oauthConsent.redirectUri, state: oauthConsent.state, scope: oauthConsent.scope, + nonce: oauthConsent.nonce, code_challenge: oauthConsent.codeChallenge, code_challenge_method: oauthConsent.codeChallengeMethod, };