feature: Allow 3rd party providers to send a post registration redire…#122
feature: Allow 3rd party providers to send a post registration redire…#122jono-booth merged 1 commit intorelease-ulmofrom
Conversation
There was a problem hiding this comment.
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_informationin pipeline.py to add a_build_redirect_urlhelper 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.
8ebcfd0 to
e51f97a
Compare
iloveagent57
left a comment
There was a problem hiding this comment.
Looks good! Just the one nit, not a blocker.
e51f97a to
c157723
Compare
There was a problem hiding this comment.
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.
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