fix email as 2fa for sso #266

Closed
opened 2026-04-05 20:45:25 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @stefan0xC on 11/26/2025

only validate master password hash if an email is provided and improve the find_by_device lookup by sorting by the most recently used device (i.e. the one last updated, which we make sure by saving the device on each login attempt).

(I think I got rid of the issue by updating the device on each login, if not I can restore the alternative version again.)

*Originally created by @stefan0xC on 11/26/2025* only validate master password hash if an email is provided and improve the find_by_device lookup by sorting by the most recently used device (i.e. the one last updated, which we make sure by saving the device on each login attempt). (I think I got rid of the issue by updating the device on each login, if not I can restore the [alternative version again](https://github.com/dani-garcia/vaultwarden/blob/68c59d517aa7eaf02de27acbc5eab0e58ff52589/src/db/models/user.rs#L389-L401).)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#266