Repository navigation
Conversation
Signed-off-by: Vlad Kamerdinerov <[email protected]>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
id field when sub is missing in OIDC callbackid field when sub is missing in OIDC callback
BeryJu
approved these changes
Jun 3, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22672 +/- ##
==========================================
- Coverage 93.29% 93.25% -0.05%
==========================================
Files 1033 1033
Lines 60150 60150
Branches 400 400
==========================================
- Hits 56116 56091 -25
- Misses 4034 4059 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
BeryJu
force-pushed
the
fix/oidc-callback-fallback-id-to-sub
branch
from
June 3, 2026 10:13
dc00d35 to
cf5cba4
Compare
dominic-r
pushed a commit
that referenced
this pull request
Jun 4, 2026
…allback (#22672) fix/oidc-callback-fallback-id-to-sub Signed-off-by: Vlad Kamerdinerov <[email protected]> Co-authored-by: Jens Langhammer <[email protected]>
kensternberg-authentik
added a commit
that referenced
this pull request
Jun 30, 2026
* main: (175 commits) web: fix British spellings flagged by cspell (#22820) web: Flesh out frontend, E2E, agent instructions. (#22388) root: update gen-changelog to filter unnecessary commits (#22550) root: gitignore release generation artifacts (#22549) sources/oauth: Fallback to `id` field when `sub` is missing in OIDC callback (#22672) translate: Updates for project authentik and language fr_FR (#22687) ci: replace deprecated app-id with client-id for actions/create-github-app-token (#22799) web: bump @playwright/test from 1.59.1 to 1.60.0 in /web (#22476) web: bump the storybook group across 1 directory with 5 updates (#22653) website/docs: add oidc issuer information (#22556) ci: bump snok/container-retention-policy from 3.0.1 to 3.1.0 (#22778) website: bump the build group across 1 directory with 9 updates (#22669) web: bump knip from 6.12.0 to 6.14.1 in /web (#22657) ci: update ubuntu version of ARM runners (#22798) core: bump openapitools/openapi-generator-cli from v7.20.0 to v7.22.0 in /packages/client-go (#22573) core: bump axllent/mailpit from v1.30.0 to v1.30.1 in /tests/e2e (#22747) core: bump goauthentik/fips-python from `33d1ed9` to `7a06339` in /lifecycle/container (#22676) ci: explicitly exit Node lint scripts to fix CI hang (#22794) core: bump openapitools/openapi-generator-cli from v7.21.0 to v7.22.0 in /packages/client-ts (#22575) core: bump django-stubs[compatible-mypy] from 6.0.4 to 6.0.5 (#22748) ...
|
Hi! |
Contributor
Author
Fixed at 2026.8.0! |
1 task
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.
Fix: Fallback to
idfield whensubis missing in OIDC callbackProblem
Some OAuth2 providers that expose an OIDC-compatible endpoint do not return the standard
subclaim in their profile response. Instead, they use a provider-specificidfield.Example is Yandex OAuth — its profile endpoint returns
idrather thansub, which causedOpenIDConnectOAuth2Callback.get_user_id()to always returnNoneand authentication to fail with:Also can help with issue - #16115
Solution
Updated
get_user_idinOpenIDConnectOAuth2Callbackto fall back to theidfield whensubis not present:This keeps full compatibility with standard OIDC providers that return
sub, while also supporting non-standard providers like Yandex that useid.Affected providers
idinstead ofsubidas the unique user identifierStep for reproducing
Verified against Yandex OAuth source — authentication now completes successfully and the correct user identifier is extracted from the profile response.