[PR #599] [MERGED] feat: email verification for registration #1070

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/599
Author: @catalinpit
Created: 10/27/2023
Status: Merged
Merged: 11/21/2023
Merged by: @Mythie

Base: feat/refreshHead: feat/email-verification


📝 Commits (10+)

  • f9322ad feat: email verification for registration
  • b93ec5f chore: improvements
  • 0c0042a chore: add banner for unverified users
  • 6af2de6 feat: add banner
  • 0ac4a58 chore: migration for updating existing users
  • 1ad29ba chore: some improvements
  • 26bfcfb Merge branch 'feat/refresh' into feat/email-verification
  • 30be074 chore: implement feedback
  • 434dd5b Merge branch 'feat/refresh' into feat/email-verification
  • b7cb840 chore: bump react-email and resend versions

📊 Changes

21 files changed (+1008 additions, -602 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/upload-document.tsx (+3 -1)
📝 apps/web/src/app/(dashboard)/layout.tsx (+2 -0)
apps/web/src/app/(unauthenticated)/verify-email/[token]/page.tsx (+97 -0)
apps/web/src/app/(unauthenticated)/verify-email/page.tsx (+28 -0)
apps/web/src/components/(dashboard)/layout/verify-email-banner.tsx (+123 -0)
📝 package-lock.json (+350 -593)
📝 package.json (+2 -2)
📝 packages/email/package.json (+4 -4)
packages/email/template-components/template-confirmation-email.tsx (+52 -0)
packages/email/templates/confirm-email.tsx (+69 -0)
📝 packages/lib/next-auth/auth-options.ts (+4 -0)
packages/lib/server-only/auth/send-confirmation-email.ts (+56 -0)
packages/lib/server-only/user/generate-confirmation-token.ts (+41 -0)
packages/lib/server-only/user/send-confirmation-token.ts (+41 -0)
packages/lib/server-only/user/verify-email.ts (+70 -0)
packages/prisma/migrations/20231025074705_add_email_confirmation_registration/migration.sql (+17 -0)
packages/prisma/migrations/20231031072857_verify_existing_users/migration.sql (+3 -0)
📝 packages/prisma/schema.prisma (+12 -1)
📝 packages/trpc/server/auth-router/router.ts (+6 -1)
📝 packages/trpc/server/profile-router/router.ts (+23 -0)

...and 1 more files

📄 Description

This PR adds the "email verification" feature. The diagram shows the thought process behind the implementation.

Screenshot 2023-10-31 at 09 57 10

When a user registers, the account will be limited until the person confirms the account. For example, the user can't upload documents for signing.

To get full, unrestricted access, the user needs to confirm the email address by clicking on the link from the email. Also, the user can request a new verification link by clicking on the button from the top banner.

Screenshot 2023-10-31 at 08 51 24

Summary by CodeRabbit

  • New Feature: Introduced an email verification system to enhance account security. Users will now receive a confirmation email upon registration.
  • New Feature: Added a dedicated page for email verification. Users can verify their email by clicking the link sent to their inbox.
  • New Feature: Implemented a system to generate and manage unique verification tokens for each user. This ensures a secure and personalized email verification process.
  • Improvement: Updated the user registration process to include email verification. This adds an extra layer of security and helps ensure the authenticity of user accounts.
  • Improvement: Enhanced the database schema to support email verification tokens. This allows for efficient management and tracking of email verification processes.

🔄 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/599 **Author:** [@catalinpit](https://github.com/catalinpit) **Created:** 10/27/2023 **Status:** ✅ Merged **Merged:** 11/21/2023 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `feat/refresh` ← **Head:** `feat/email-verification` --- ### 📝 Commits (10+) - [`f9322ad`](https://github.com/documenso/documenso/commit/f9322ade661b185138ed0baf222b3a769747501e) feat: email verification for registration - [`b93ec5f`](https://github.com/documenso/documenso/commit/b93ec5f013cac431d1d05a23e693ad2a5bb83d90) chore: improvements - [`0c0042a`](https://github.com/documenso/documenso/commit/0c0042a06b9fff54274fa68830461f7c5a1c3746) chore: add banner for unverified users - [`6af2de6`](https://github.com/documenso/documenso/commit/6af2de67a0bd23b3e7f25eb37f07d0a8ed7d1ecf) feat: add banner - [`0ac4a58`](https://github.com/documenso/documenso/commit/0ac4a58b5a604ff0228748fad16056317e6c6cfe) chore: migration for updating existing users - [`1ad29ba`](https://github.com/documenso/documenso/commit/1ad29bab6866ed9b76fed4d6b3a80d209b86dbc0) chore: some improvements - [`26bfcfb`](https://github.com/documenso/documenso/commit/26bfcfb8f443b86f1c31f767458e02ec5ed17a23) Merge branch 'feat/refresh' into feat/email-verification - [`30be074`](https://github.com/documenso/documenso/commit/30be0747e90b3c01920c759b1209529f336ee335) chore: implement feedback - [`434dd5b`](https://github.com/documenso/documenso/commit/434dd5b1947965285c882119c6ce54b5e86c80ba) Merge branch 'feat/refresh' into feat/email-verification - [`b7cb840`](https://github.com/documenso/documenso/commit/b7cb840d153cac2f2c5bf756ac332ed816369896) chore: bump react-email and resend versions ### 📊 Changes **21 files changed** (+1008 additions, -602 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/upload-document.tsx` (+3 -1) 📝 `apps/web/src/app/(dashboard)/layout.tsx` (+2 -0) ➕ `apps/web/src/app/(unauthenticated)/verify-email/[token]/page.tsx` (+97 -0) ➕ `apps/web/src/app/(unauthenticated)/verify-email/page.tsx` (+28 -0) ➕ `apps/web/src/components/(dashboard)/layout/verify-email-banner.tsx` (+123 -0) 📝 `package-lock.json` (+350 -593) 📝 `package.json` (+2 -2) 📝 `packages/email/package.json` (+4 -4) ➕ `packages/email/template-components/template-confirmation-email.tsx` (+52 -0) ➕ `packages/email/templates/confirm-email.tsx` (+69 -0) 📝 `packages/lib/next-auth/auth-options.ts` (+4 -0) ➕ `packages/lib/server-only/auth/send-confirmation-email.ts` (+56 -0) ➕ `packages/lib/server-only/user/generate-confirmation-token.ts` (+41 -0) ➕ `packages/lib/server-only/user/send-confirmation-token.ts` (+41 -0) ➕ `packages/lib/server-only/user/verify-email.ts` (+70 -0) ➕ `packages/prisma/migrations/20231025074705_add_email_confirmation_registration/migration.sql` (+17 -0) ➕ `packages/prisma/migrations/20231031072857_verify_existing_users/migration.sql` (+3 -0) 📝 `packages/prisma/schema.prisma` (+12 -1) 📝 `packages/trpc/server/auth-router/router.ts` (+6 -1) 📝 `packages/trpc/server/profile-router/router.ts` (+23 -0) _...and 1 more files_ </details> ### 📄 Description This PR adds the "email verification" feature. The diagram shows the thought process behind the implementation. ![Screenshot 2023-10-31 at 09 57 10](https://github.com/documenso/documenso/assets/25515812/208446e3-373d-46ee-b9de-dca62de46104) When a user registers, the account will be limited until the person confirms the account. For example, the user can't upload documents for signing. To get full, unrestricted access, the user needs to confirm the email address by clicking on the link from the email. Also, the user can request a new verification link by clicking on the button from the top banner. ![Screenshot 2023-10-31 at 08 51 24](https://github.com/documenso/documenso/assets/25515812/583f66ac-e158-4370-bfc2-db2371a74667) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Feature: Introduced an email verification system to enhance account security. Users will now receive a confirmation email upon registration. - New Feature: Added a dedicated page for email verification. Users can verify their email by clicking the link sent to their inbox. - New Feature: Implemented a system to generate and manage unique verification tokens for each user. This ensures a secure and personalized email verification process. - Improvement: Updated the user registration process to include email verification. This adds an extra layer of security and helps ensure the authenticity of user accounts. - Improvement: Enhanced the database schema to support email verification tokens. This allows for efficient management and tracking of email verification processes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:31:42 +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#1070
No description provided.