fix: normalize OIDC issuer URL to avoid double slashes
CI / API CI (push) Failing after 9s
CI / Web CI (push) Failing after 10s

The OIDC issuer URL in .env ends with a trailing slash, which caused
the authorize endpoint to have a double slash (//authorize).

- Normalize issuer URL by removing trailing slash before appending path
- Applied to both LoginPage.tsx and CallbackPage.tsx
- Fixes Authentik 'not found' error on login redirect
This commit is contained in:
2026-05-16 13:36:50 +00:00
parent ab400d7ad9
commit d23582eb82
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -35,7 +35,8 @@ export default function CallbackPage() {
setStatus('Exchanging code for token...')
const tokenResponse = await fetch(`${OIDC_ISSUER}/token/`, {
const issuer = OIDC_ISSUER.endsWith('/') ? OIDC_ISSUER.slice(0, -1) : OIDC_ISSUER
const tokenResponse = await fetch(`${issuer}/token/`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
+2 -1
View File
@@ -20,7 +20,8 @@ export default function LoginPage() {
code_challenge_method: 'S256',
})
window.location.href = `${OIDC_ISSUER}/authorize?${params.toString()}`
const issuer = OIDC_ISSUER.endsWith('/') ? OIDC_ISSUER.slice(0, -1) : OIDC_ISSUER
window.location.href = `${issuer}/authorize?${params.toString()}`
}
initiateLogin()