mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-17 01:12:27 -05:00
[PR #6495] [MERGED] fix email as 2fa for sso #24658
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6495
Author: @stefan0xC
Created: 11/26/2025
Status: ✅ Merged
Merged: 12/6/2025
Merged by: @dani-garcia
Base:
main← Head:fix-2fa-email-for-sso📝 Commits (6)
b953411fix email as 2fa for sso293e1b8allow saving device without updatingupdated_at531bf44check if email is some7b56458allow device to be saved in postgresqlc5fe9a1use twofactor_incomplete table72a8313no need to update device.updated_at📊 Changes
7 files changed (+93 additions, -60 deletions)
View changed files
📝
src/api/core/accounts.rs(+1 -1)📝
src/api/core/two_factor/email.rs(+32 -15)📝
src/api/identity.rs(+15 -9)📝
src/api/push.rs(+1 -1)📝
src/auth.rs(+1 -1)📝
src/db/models/device.rs(+27 -31)📝
src/db/models/user.rs(+16 -2)📄 Description
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.)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.