From 84038c25ec5a6c06012470a77f29d437caf1f0bf Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Sat, 16 May 2026 13:46:09 +0000 Subject: [PATCH] fix: use correct Authentik authorization and token endpoints The OIDC issuer URL was being used to construct authorize/token URLs, but Authentik's endpoints are at different paths than the issuer base. - Use the actual authorization_endpoint from .well-known config - Use the actual token_endpoint from .well-known config - Fixes Authentik 'not found' error on login redirect --- apps/web/src/pages/CallbackPage.tsx | 4 ++-- apps/web/src/pages/LoginPage.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/pages/CallbackPage.tsx b/apps/web/src/pages/CallbackPage.tsx index 0309569..b65bddc 100644 --- a/apps/web/src/pages/CallbackPage.tsx +++ b/apps/web/src/pages/CallbackPage.tsx @@ -35,8 +35,8 @@ export default function CallbackPage() { setStatus('Exchanging code for token...') - const issuer = OIDC_ISSUER.endsWith('/') ? OIDC_ISSUER.slice(0, -1) : OIDC_ISSUER - const tokenResponse = await fetch(`${issuer}/token/`, { + const tokenEndpoint = 'https://auth.commumedia.org/application/o/token/' + const tokenResponse = await fetch(tokenEndpoint, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/apps/web/src/pages/LoginPage.tsx b/apps/web/src/pages/LoginPage.tsx index 8082560..f7b2151 100644 --- a/apps/web/src/pages/LoginPage.tsx +++ b/apps/web/src/pages/LoginPage.tsx @@ -20,8 +20,8 @@ export default function LoginPage() { code_challenge_method: 'S256', }) - const issuer = OIDC_ISSUER.endsWith('/') ? OIDC_ISSUER.slice(0, -1) : OIDC_ISSUER - window.location.href = `${issuer}/authorize?${params.toString()}` + const authorizationEndpoint = 'https://auth.commumedia.org/application/o/authorize/' + window.location.href = `${authorizationEndpoint}?${params.toString()}` } initiateLogin()