Repository navigation
Feat/mcdi auth - #85
Merged
Merged
Conversation
…uth and account linking
…bility This commit restores the legacy mobile email/password and OTP login/registration endpoints and service methods, ensuring backward compatibility alongside the new MCDI SSO flow. Also includes minor test file formatting.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces the integration of the MicroClub Digital Identity (MCDI) Single Sign-On (SSO) for the
multAI-backapplication, while maintaining full backward compatibility for existing mobile authentication methods.Features & Changes
/mcdi/exchangeendpoint for secure token exchange and session creation, supporting both mobile and web/staff clients.stateand CSRF cookie validation across Starlette/FastAPI routes for secure OAuth transactions.AuthServiceandUsersServiceto harmoniously handle both the legacy email/password/OTP mechanisms and the new MCDI OAuth flow.Backward Compatibility
/login,/register,/register/resend,/register/verify) remain intact and fully functional .mcdi_serviceis injected gracefully, preventing service crashes for modules that do not rely on MCDI.Testing
tests/unit/test_mcdi_auth.pycovering:tests/integration/*) which now successfully pass by virtue of the restored legacy endpoints.197 passed, 28 skipped, 8 warnings in 30.99s(All tests are strictly green).*Note: This PR targets the
developbranch.