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
This commit is contained in:
2026-05-16 13:46:09 +00:00
parent d23582eb82
commit 84038c25ec
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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',
+2 -2
View File
@@ -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()