edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

[WIP] feat: Added custom auth endpoint for IDP initiated SSO

Open irfanuddinahmad opened this issue 1 month ago • 0 comments

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:

  • Added a new IdpInitiatedSsoView in idp_initiated_sso.py to handle IdP-initiated SSO login requests, supporting Auth0's SAML-to-OIDC pattern. This view processes requests with a connection parameter, determines the appropriate OAuth/OIDC provider, and redirects to the provider's login URL with the correct parameters.
  • Registered the new view in urls.py at the endpoint /auth/idp-sso/login, making it accessible as idp_initiated_sso_login.

Testing:

  • Added comprehensive tests in test_idp_initiated_sso.py to cover all major behaviors of the new view, including handling of valid and invalid parameters, provider selection logic, error handling, and parameter propagation.

irfanuddinahmad avatar Dec 17 '25 10:12 irfanuddinahmad