Repository navigation
refactor(auth): scope MCDI auth strictly to web staff and handle OAuth errors - #86
Merged
Merged
Conversation
- Handle optional error and error_description query params in mcdi_callback - Normalize email to lowercase before querying staff_users table - Prevent 422 Unprocessable Entity when OAuth error occurs without code
…e auth - Correct default MCDI_BASE_URL to https://mcid.microclub.info/api - Remove mobile MCDI exchange endpoint and request schema - Remove MCDI token validation from mobile session cache and token_auth dependency - Remove MCDI_REDIRECT_URI_MOBILE from configuration - Update unit tests to reflect web-only MCDI authentication suite
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.
Résumé des changements
Restriction de MCDI/MCID au Web :
/user/auth/mcdi/exchange,McdiExchangeRequest).mcdi_tokenet_validate_mcdi_sessiondans la couche mobile (token_auth.py,session.py,users.py).MCDI_REDIRECT_URI_MOBILEdans la configuration et les.env.example.Callback Web & Normalisation :
strip().lower()) pour la correspondance avecstaff_users.Annotated[str | None, Query()] = None) avec redirection vers/auth/login?error=...sans erreur 422.Tests & Qualité :
test_mcdi_auth.py, 11/11 tests au vert).