Prevent YubiKey option availability if Yubico credentials are not configured;
Prevent Duo option availability if there is no valid per-user data or fully configured global Duo keys;
Prevent WebAuthn if domain does not match one that generates challenge payload;
Prevent E-mail option if email 2FA is disabled by admin.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/dani-garcia/vaultwarden/pull/7013
**Author:** [@0x484558](https://github.com/0x484558)
**Created:** 3/24/2026
**Status:** ✅ Merged
**Merged:** 4/5/2026
**Merged by:** [@dani-garcia](https://github.com/dani-garcia)
**Base:** `main` ← **Head:** `feat/hide-2fa`
---
### 📝 Commits (3)
- [`7370168`](https://github.com/dani-garcia/vaultwarden/commit/737016863a8e2faa2826c3859f3a6ba51e56ddf0) do not display unavailable 2FA options
- [`1bb32da`](https://github.com/dani-garcia/vaultwarden/commit/1bb32daaf9c72b063e0885bf2e24d7ab023bb7a5) use existing function to check webauthn support
- [`bfe45e4`](https://github.com/dani-garcia/vaultwarden/commit/bfe45e47f7b77a07df5fc0bc246810ebdec61d72) clarity in 2fa skip code
### 📊 Changes
**3 files changed** (+71 additions, -7 deletions)
<details>
<summary>View changed files</summary>
📝 `src/api/core/two_factor/mod.rs` (+47 -2)
📝 `src/api/core/two_factor/webauthn.rs` (+2 -2)
📝 `src/api/identity.rs` (+22 -3)
</details>
### 📄 Description
- Prevent YubiKey option availability if Yubico credentials are not configured;
- Prevent Duo option availability if there is no valid per-user data or fully configured global Duo keys;
- Prevent WebAuthn if domain does not match one that generates challenge payload;
- Prevent E-mail option if email 2FA is disabled by admin.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/7013
Author: @0x484558
Created: 3/24/2026
Status: ✅ Merged
Merged: 4/5/2026
Merged by: @dani-garcia
Base:
main← Head:feat/hide-2fa📝 Commits (3)
7370168do not display unavailable 2FA options1bb32dause existing function to check webauthn supportbfe45e4clarity in 2fa skip code📊 Changes
3 files changed (+71 additions, -7 deletions)
View changed files
📝
src/api/core/two_factor/mod.rs(+47 -2)📝
src/api/core/two_factor/webauthn.rs(+2 -2)📝
src/api/identity.rs(+22 -3)📄 Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.