From b4458c54b2988d261bf6f0ba134260424273e223 Mon Sep 17 00:00:00 2001 From: Kent Rancourt Date: Fri, 24 Jan 2025 15:31:11 -0500 Subject: [PATCH] fix(ui): tolerate entra id RFC8414 deviation (#3359) Signed-off-by: Kent Rancourt --- ui/src/features/auth/oidc-login.tsx | 5 ++++- ui/src/features/auth/token-renew.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/features/auth/oidc-login.tsx b/ui/src/features/auth/oidc-login.tsx index f924e52bf..f6f3c8bec 100644 --- a/ui/src/features/auth/oidc-login.tsx +++ b/ui/src/features/auth/oidc-login.tsx @@ -65,7 +65,10 @@ export const OIDCLogin = ({ oidcConfig }: Props) => { }) .then((response) => processDiscoveryResponse(issuerUrl, response)) .then((response) => { - if (response.code_challenge_methods_supported?.includes('S256') !== true) { + if ( + response.code_challenge_methods_supported?.includes('S256') !== true && + !issuerUrl.toString().startsWith('https://login.microsoftonline.com') + ) { throw new Error('OIDC config fetch error'); } diff --git a/ui/src/features/auth/token-renew.tsx b/ui/src/features/auth/token-renew.tsx index 571d069ca..ee8700193 100644 --- a/ui/src/features/auth/token-renew.tsx +++ b/ui/src/features/auth/token-renew.tsx @@ -56,7 +56,10 @@ export const TokenRenew = () => { }) .then((response) => processDiscoveryResponse(issuerUrl, response)) .then((response) => { - if (response.code_challenge_methods_supported?.includes('S256') !== true) { + if ( + response.code_challenge_methods_supported?.includes('S256') !== true && + !issuerUrl.toString().startsWith('https://login.microsoftonline.com') + ) { throw new Error('OIDC config fetch error'); }