mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-16 05:34:10 +03:00
[PR #6473] [MERGED] fix email as 2fa provider #3752
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/6473
Author: @stefan0xC
Created: 11/18/2025
Status: ✅ Merged
Merged: 11/23/2025
Merged by: @dani-garcia
Base:
main← Head:fix-mail-2fa📝 Commits (1)
1d3b8a9fix email as 2fa provider📊 Changes
2 files changed (+11 additions, -24 deletions)
View changed files
📝
src/api/core/two_factor/email.rs(+10 -11)📝
src/db/models/user.rs(+1 -13)📄 Description
as discussed in https://github.com/dani-garcia/vaultwarden/discussions/6471#discussioncomment-14978860 we want to get the correct user account for a given mail address when sending the 2fa via mail so I've reverted some of the changes introduced by
e3d66216f6NOTE: this won't fix the invitation flow change because we can only activate email as second factor, so this will still be set up automatically between signup and login if 2fa is required. after registration you will be sent an email (unless you have disabled mail as second factor) which you have to confirm. if you do everything in one session this will also accept the invitation. (if you have disabled 2fa as second factor the flow will be broken a bit because you will have to setup 2fa the old fashioned way after signup. you will also likely have to be reinvited because the generated link is missing the needed parameter
orgUserHasExistingUser=trueto redirect you to login instead of the signup form.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.