[PR #7013] [MERGED] Do not display unavailable 2FA options #36983

Closed
opened 2026-07-13 21:30:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: mainHead: feat/hide-2fa


📝 Commits (3)

  • 7370168 do not display unavailable 2FA options
  • 1bb32da use existing function to check webauthn support
  • bfe45e4 clarity 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

  • 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>
GiteaMirror added the pull-request label 2026-07-13 21:30:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#36983