Skip to content

fix: LP-1083 upgrade edx-auth-backends to 5.1.1 to keep next across OAuth session cleanup - #16

Merged
djoseph-apphelix merged 1 commit into
release-ulmofrom
djoseph/LP-1083-auth-backends-5.1.1
Nov 10, 2026
Merged

djoseph-apphelix merged 1 commit into
release-ulmofrom
djoseph/LP-1083-auth-backends-5.1.1

Conversation

@djoseph-apphelix

@djoseph-apphelix djoseph-apphelix commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps edx-auth-backends from 4.6.2 to 5.1.1 to fix learners getting HTTP 403 on their program certificate link.

Root cause. EdXOAuth2.start() in 4.6.2 logs out any existing session before starting the OAuth flow. That flush also discards the next redirect social-auth stored a moment earlier, so learners who already had a live Credentials session finished login with no destination and landed on LOGIN_REDIRECT_URL, the staff-only /api/v2/credentials/. Learners with no Credentials session were unaffected, which is why it looked intermittent.

Fix. Upstream openedx/auth-backends#470 carries the stored redirect across the session cleanup. Released as 5.1.1.

Compatibility. The jump across 5.0.0 only drops Python 3.8 and 3.11 support. Django, social-auth-core and social-auth-app-django pins are unchanged; pip check is clean.

Testing

  • Devstack Credentials with the production combination (Python 3.12, social-auth-core 4.8.3, Django 5.2.11), as a non-staff learner: with a live Credentials session, /login/?next=/credentials/<uuid>/ now lands on the certificate instead of the 403. Plain login still goes to LOGIN_REDIRECT_URL; logout still chains through to the LMS.
  • credentials/apps/core, credentials/apps/api/tests/test_authentication.py and credentials/apps/records give identical results on 4.6.2 and 5.1.1.

Ticket: LP-1083

Depends on #17. The check migrations job fails on every release-ulmo PR right now because ubuntu-latest moved to Ubuntu 26.04 (LP-1515). The CI fix lives in #17; this PR is the dependency bump only and will go green once #17 merges and this branch is rebased.

@djoseph-apphelix
djoseph-apphelix force-pushed the djoseph/LP-1083-auth-backends-5.1.1 branch from 59d61bc to a529aa0 Compare November 6, 2026 18:34
check_migrations:
name: check migrations
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, followed the same pattern as the devstack and edx-platform pins:

For the record, Credentials is a third root cause: ubuntu-26.04 has no preinstalled MySQL (the job starts it with /etc/init.d/mysql), and its libxmlsec1 1.3.9 no longer builds the xmlsec 1.3.13 that the job compiled from source, which turned out to be dead since xmlsec is no longer a dependency.

@robrap robrap left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[inform/possible request] I also created openedx/auth-backends#479.

  • We should probably create a PR to update the CHANGELOG for the changes we made, and it probably wouldn't be to hard to just get it up to date. If you do this, just note it on the issue ticket. Since this is docs only, we don't need to get it released or tagged.

…Auth session cleanup

edx-auth-backends 4.6.2 logs out any existing session when the OAuth flow starts, which flushes the `next` redirect social-auth stored. Learners who already had a Credentials session were sent to LOGIN_REDIRECT_URL (the staff-only API root) instead of their certificate and got HTTP 403.

Fixed upstream in openedx/auth-backends#470, released as 5.1.1. The jump across 5.0.0 only drops Python 3.8 and 3.11 support.

Ticket: LP-1083
@djoseph-apphelix
djoseph-apphelix force-pushed the djoseph/LP-1083-auth-backends-5.1.1 branch from 1f801a4 to 944a50e Compare November 10, 2026 19:38
@djoseph-apphelix
djoseph-apphelix merged commit f06744f into release-ulmo Nov 10, 2026
5 checks passed
@djoseph-apphelix
djoseph-apphelix deleted the djoseph/LP-1083-auth-backends-5.1.1 branch November 10, 2026 19:45
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.

2 participants