Skip to content

feature: Allow 3rd party providers to send a post registration redire…#122

Merged
jono-booth merged 1 commit intorelease-ulmofrom
jb/saml-auth-redirect
Feb 13, 2026
Merged

feature: Allow 3rd party providers to send a post registration redire…#122
jono-booth merged 1 commit intorelease-ulmofrom
jb/saml-auth-redirect

Conversation

@jono-booth
Copy link

@jono-booth jono-booth commented Feb 13, 2026

Description

This pull request adds functionality to allow 3rd party authentication providers to send a post-registration redirect path via the RelayState parameter during SAML authentication flows. The implementation ensures that when a 'next' URL is stored in the session (after validation), it gets properly appended as a query parameter when redirecting users to the login or registration pages.

FEATURE FLAG: thirdpartyauth.tpa_next_url_on_dispatch

Copilot AI review requested due to automatic review settings February 13, 2026 12:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds functionality to allow 3rd party authentication providers to send a post-registration redirect path via the RelayState parameter during SAML authentication flows. The implementation ensures that when a 'next' URL is stored in the session (after validation), it gets properly appended as a query parameter when redirecting users to the login or registration pages.

Changes:

  • Modified ensure_user_information in pipeline.py to add a _build_redirect_url helper function that appends the 'next' URL from the session as a query parameter to login/register redirects
  • Added comprehensive test coverage for the new redirect URL building functionality, including tests for special character encoding and various redirect scenarios

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
common/djangoapps/third_party_auth/pipeline.py Added _build_redirect_url helper function that appends session 'next' URL to redirect URLs with proper URL encoding; updated dispatch_to_login and dispatch_to_register to use this helper
common/djangoapps/third_party_auth/tests/test_pipeline_integration.py Added EnsureUserInformationNextUrlTestCase test class with comprehensive tests covering next URL forwarding, empty/null cases, and special character encoding

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jono-booth jono-booth force-pushed the jb/saml-auth-redirect branch 3 times, most recently from 8ebcfd0 to e51f97a Compare February 13, 2026 12:29
Copy link
Member

@iloveagent57 iloveagent57 left a comment

Choose a reason for hiding this comment

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

Looks good! Just the one nit, not a blocker.

Copilot AI review requested due to automatic review settings February 13, 2026 14:28
@jono-booth jono-booth force-pushed the jb/saml-auth-redirect branch from e51f97a to c157723 Compare February 13, 2026 14:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jono-booth jono-booth merged commit b020edc into release-ulmo Feb 13, 2026
70 checks passed
@jono-booth jono-booth deleted the jb/saml-auth-redirect branch February 13, 2026 14:58
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