Repository navigation
Fix OIDC tests broken by django-allauth 65.23.0 - #1056
Merged
Merged
Conversation
django-allauth 65.23.0's complete_login calls sociallogin.provider._on_login_processed() after every login, the hook its openid_connect provider uses to track sessions for the new back-channel logout. allauth's callback builds the SocialLogin with provider=..., but the test fixture left it out, so all ten login-flow tests died on None._on_login_processed. Codex's own code never builds a SocialLogin, so only the fixture changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
develop's dependency update (8f81a48) moved django-allauth from 65.22.1 to 65.23.0. After that, 10 tests in
tests/test_oidc_login.pyfailed withAttributeError: 'NoneType' object has no attribute '_on_login_processed'.Root cause
65.23.0's
complete_login(allauth/socialaccount/internal/flows/login.py) now callssociallogin.provider._on_login_processed(request, sociallogin)after every login. The OpenID Connect provider uses that hook to track sessions for its new back-channel logout. allauth's callback builds theSocialLoginwithprovider=...insociallogin_from_response. The test fixture_socialloginleft the provider out. Codex's own code never builds aSocialLogin, so only the fixture changes: it now gets the provider from the adapter, as the callback does.Other 65.23.0 changes I checked against codex
verify_tokennow storesextra_dataas{"id_token": {...}}instead of the flat claims dict.codex.oidc.merged_claimsalready reads that nested shape.allauth.socialaccount.providers.openid_connect.urlsat/sso/, so 65.23.0 adds/sso/<provider>/logout/,/sso/<provider>/logout/callback/and/sso/<provider>/logout/backchannel/. The back-channel one is CSRF-exempt and validates a logout token signed by the IdP. They go through the same provider lookup, so they return 404 while OIDC is off. I left them as they are. Whether to expose them, or switchoidc_logout_urlto allauth's RP-initiated logout (which now keeps the ID token forid_token_hint), is a separate decision.Gates
make fixpasses.make lintpasses with 0 errors and 0 warnings.make typasses.make testpasses: pytest 2891 passed, 2 skipped; vitest 1465 passed.tests/test_oidc_login.py: 29 passed (10 of them failed before this change).Not verified
A real OIDC login against an IdP on 65.23.0.
🤖 Generated with Claude Code