Skip to content

fix: verify the id_token issuer against the discovered issuer - #18

Open
SAY-5 wants to merge 2 commits into
pigontech:mainfrom
SAY-5:fix/oidc-trailing-slash-issuer
Open

SAY-5 wants to merge 2 commits into
pigontech:mainfrom
SAY-5:fix/oidc-trailing-slash-issuer

Conversation

@SAY-5

@SAY-5 SAY-5 commented Oct 25, 2026

Copy link
Copy Markdown

Authentik publishes an application issuer with a trailing slash, and the same value is the iss of every id_token it signs. env.ts strips that slash from OIDC_ISSUER_URL and discoverOidc() already allows for it when checking the discovery document, but validateIdToken() passed the stripped value to jwtVerify, whose exact comparison then rejects every login with unexpected "iss" claim value. This verifies the token against doc.issuer instead, which discovery has already matched to the configured issuer, so a provider's own form is accepted without loosening the check.

Fixes #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OIDC login always fails with Authentik: issuer trailing slash mismatch

2 participants