[WIP] feat: Added custom auth endpoint for IDP initiated SSO #37777
+679
−0
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.
This pull request introduces a new view to support IdP-initiated SSO login flows, specifically designed for Auth0's IdP-initiated SAML sign-on to OIDC applications. It adds a robust, well-tested endpoint for handling these SSO flows, updates the URL configuration to expose the new view, and includes comprehensive tests to ensure correct behavior.
IdP-Initiated SSO Support:
IdpInitiatedSsoViewinidp_initiated_sso.pyto handle IdP-initiated SSO login requests, supporting Auth0's SAML-to-OIDC pattern. This view processes requests with aconnectionparameter, determines the appropriate OAuth/OIDC provider, and redirects to the provider's login URL with the correct parameters.urls.pyat the endpoint/auth/idp-sso/login, making it accessible asidp_initiated_sso_login.Testing:
test_idp_initiated_sso.pyto cover all major behaviors of the new view, including handling of valid and invalid parameters, provider selection logic, error handling, and parameter propagation.