[PR #1053] [MERGED] feat: remove 2FA password requirement #1348

Closed
opened 2026-02-26 19:32:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1053
Author: @dguyen
Created: 3/23/2024
Status: Merged
Merged: 3/25/2024
Merged by: @dguyen

Base: mainHead: feat/2fa-enhancements


📝 Commits (4)

📊 Changes

12 files changed (+437 additions, -663 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/settings/security/page.tsx (+43 -49)
apps/web/src/components/forms/2fa/authenticator-app.tsx (+0 -43)
📝 apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx (+49 -82)
📝 apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx (+151 -220)
apps/web/src/components/forms/2fa/recovery-codes.tsx (+0 -33)
📝 apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx (+100 -123)
📝 packages/lib/server-only/2fa/disable-2fa.ts (+7 -17)
📝 packages/lib/server-only/2fa/enable-2fa.ts (+22 -20)
📝 packages/lib/server-only/2fa/setup-2fa.ts (+0 -17)
packages/lib/server-only/2fa/view-backup-codes.ts (+30 -0)
📝 packages/trpc/server/two-factor-authentication-router/router.ts (+33 -48)
📝 packages/trpc/server/two-factor-authentication-router/schema.ts (+2 -11)

📄 Description

Description

To allow 2FA to be used in contexts besides signing in, we have opted to remove the password requirement for managing 2FA.

Changes Made

  • Removed password requirement when configuring 2FA
  • Added 2FA support for non Documenso accounts
  • Added 2FA requirement when removing 2FA
  • Added 2FA requirement when viewing backup codes

Testing Performed

Used this tool to generate 2FA codes:

Tested the following using a Google SSO account, and a Documenso account:

  • Setting up 2FA
  • Disabling 2FA
  • Logging in via 2FA for Documenso accounts

Checklist

  • I have tested these changes locally and they work as expected.
  • I have followed the project's coding style guidelines.

🔄 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/documenso/documenso/pull/1053 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 3/23/2024 **Status:** ✅ Merged **Merged:** 3/25/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/2fa-enhancements` --- ### 📝 Commits (4) - [`ede6006`](https://github.com/documenso/documenso/commit/ede6006b165f5cbc76d553217b97258bf5cc33ff) feat: remove 2FA password requirement - [`a6ee680`](https://github.com/documenso/documenso/commit/a6ee6804632f0772ce165d0d04d942b0df695eff) fix: remove password form for SSO - [`29d557d`](https://github.com/documenso/documenso/commit/29d557dc83d43b354be9dc349c502ee4fa7c6ea9) chore: refactor - [`e5de2c7`](https://github.com/documenso/documenso/commit/e5de2c79ca7de164b403f15ab6b91514dc6d9025) chore: refactor ### 📊 Changes **12 files changed** (+437 additions, -663 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/settings/security/page.tsx` (+43 -49) ➖ `apps/web/src/components/forms/2fa/authenticator-app.tsx` (+0 -43) 📝 `apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx` (+49 -82) 📝 `apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx` (+151 -220) ➖ `apps/web/src/components/forms/2fa/recovery-codes.tsx` (+0 -33) 📝 `apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx` (+100 -123) 📝 `packages/lib/server-only/2fa/disable-2fa.ts` (+7 -17) 📝 `packages/lib/server-only/2fa/enable-2fa.ts` (+22 -20) 📝 `packages/lib/server-only/2fa/setup-2fa.ts` (+0 -17) ➕ `packages/lib/server-only/2fa/view-backup-codes.ts` (+30 -0) 📝 `packages/trpc/server/two-factor-authentication-router/router.ts` (+33 -48) 📝 `packages/trpc/server/two-factor-authentication-router/schema.ts` (+2 -11) </details> ### 📄 Description ## Description To allow 2FA to be used in contexts besides signing in, we have opted to remove the password requirement for managing 2FA. ## Changes Made - Removed password requirement when configuring 2FA - Added 2FA support for non Documenso accounts - Added 2FA requirement when removing 2FA - Added 2FA requirement when viewing backup codes ## Testing Performed Used this tool to generate 2FA codes: - https://2fa.zone/ Tested the following using a Google SSO account, and a Documenso account: - Setting up 2FA - Disabling 2FA - Logging in via 2FA for Documenso accounts ## Checklist - [X] I have tested these changes locally and they work as expected. - [X] I have followed the project's coding style guidelines. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1348
No description provided.