You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(auth): prevent code requests for invalid dashboard users
Refactors the validation logic in `AuthService.initiateEmailSignIn` to
correct a critical security flaw.
Previously, the logic allowed verification codes to be sent to any email
address during a dashboard login attempt, even if the user did not exist
or lacked permissions.
This change restructures the validation into a more explicit `if-else if`
block. It now correctly throws an `UnauthorizedException` if the user is
not found or a `ForbiddenException` if they lack permissions, ensuring
that execution is halted immediately and a code is never sent for an
invalid dashboard login attempt.
0 commit comments