fix-magic-email-case
🐛 Bug Fixes
Magic login accepts a different email case
Goal: A Magic user who types the same address with a different case (for example -EXT instead of -ext) must still be recognized. Azure already matched that way; Magic rejected the token.
Solution: Compare the Magic token email and the requested email case-insensitively. Resolve the account with the existing collation on findUserByEmail, then continue with the email stored on the user. The SMS auth-config lookup uses the same collation, so the pre-login check finds the account too.
Features:
prenom-EXT@…matches a storedprenom-ext@…on Magic login- The session email is the address stored on the user
- SMS requirement lookup no longer misses the account because of case
Files Modified:
src/domains/gateway/services/magic-link.service.ts- Case-insensitive token check and stored emailsrc/core/auth/auth.service.ts- Case-insensitive auth-config lookuppackage.json- Pinfollow-redirectsto 1.16.1package-lock.json- Lockfile for that pin