fix: accept trailing slash OIDC issuers - #13
Open
mikemikimike wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / Problem
Authentik publishes application-scoped OIDC issuers with a trailing slash. Inkvoice normalizes
OIDC_ISSUER_URLby removing that slash, then passes only the normalized value tojosefor exactissvalidation. As a result, every Authentik login fails after the callback with an issuer mismatch.Changes
issincludes the trailing slash.Tests
OPENSSL_CONF=NUL bun test packages/backend/src/tests/oidc-service.test.ts— 16 tests passed.bun run typecheck— passed.bun run build— passed.bunx biome lint packages/backend/src/services/oidc.service.ts packages/backend/src/tests/oidc-service.test.ts— passed.demo-seed.test.tshas a Windows-only SQLite cleanup failure because its same-file fresh-database helper cannot remove an open database; the OIDC test file passes independently.The full repository
bun run lintcurrently reports pre-existing CRLF formatting diagnostics across the checkout; the changed files pass Biome lint and the commit hook formatted only those two files.Compatibility / Security
This preserves the existing discovery-document normalization and continues using
jose's exact issuer allowlist. It does not introduce domain or substring matching.Issue link
Closes #11
#11