[PR #730] [MERGED] Implement change-email, email-verification, account-recovery, and welcome notifications #3636

Closed
opened 2025-10-09 18:27:14 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/730
Author: @tomuta
Created: 11/17/2019
Status: Merged
Merged: 11/25/2019
Merged by: @dani-garcia

Base: masterHead: email_verification


📝 Commits (1)

  • bd1e8be Implement change-email, email-verification, account-recovery, and welcome notifications

📊 Changes

33 files changed (+1164 additions, -33 deletions)

View changed files

📝 .env.template (+14 -4)
migrations/mysql/2019-11-17-011009_add_email_verification/down.sql (+1 -0)
migrations/mysql/2019-11-17-011009_add_email_verification/up.sql (+5 -0)
migrations/postgresql/2019-11-17-011009_add_email_verification/down.sql (+1 -0)
migrations/postgresql/2019-11-17-011009_add_email_verification/up.sql (+5 -0)
migrations/sqlite/2019-11-17-011009_add_email_verification/down.sql (+1 -0)
migrations/sqlite/2019-11-17-011009_add_email_verification/up.sql (+5 -0)
📝 src/api/core/accounts.rs (+170 -5)
📝 src/api/core/two_factor/email.rs (+2 -18)
📝 src/api/identity.rs (+29 -0)
📝 src/auth.rs (+58 -0)
📝 src/config.rs (+11 -0)
📝 src/crypto.rs (+16 -0)
📝 src/db/models/device.rs (+2 -1)
📝 src/db/models/user.rs (+11 -1)
📝 src/db/schemas/mysql/schema.rs (+5 -0)
📝 src/db/schemas/postgresql/schema.rs (+6 -1)
📝 src/db/schemas/sqlite/schema.rs (+5 -0)
📝 src/mail.rs (+80 -1)
src/static/templates/email/change_email.hbs (+6 -0)

...and 13 more files

📄 Description

  • Settings -> Change Email: Send out change verification emails and validate token (also validate against domain whitelist, if applicable)
  • In password hint email: Add a link to account recovery page where user can request a delete account verification email, and when they click the enclosed link then the account gets deleted (e.g. they cannot remember the password at all)
  • Main vault page: Show "Verify Email" tile and send verification email when button is clicked, and mark account as validated when link is clicked
  • Send welcome email upon registration (with verification link, if verification is required)
  • Reject login after signup if email verification is required and the user hasn't verified it yet. Send a few reminders if they attempt to login later.
  • Add schema changes for pgsql and mysql

🔄 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/730 **Author:** [@tomuta](https://github.com/tomuta) **Created:** 11/17/2019 **Status:** ✅ Merged **Merged:** 11/25/2019 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `email_verification` --- ### 📝 Commits (1) - [`bd1e8be`](https://github.com/dani-garcia/vaultwarden/commit/bd1e8be32811609fe6df452767ef2e4d542d4508) Implement change-email, email-verification, account-recovery, and welcome notifications ### 📊 Changes **33 files changed** (+1164 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `.env.template` (+14 -4) ➕ `migrations/mysql/2019-11-17-011009_add_email_verification/down.sql` (+1 -0) ➕ `migrations/mysql/2019-11-17-011009_add_email_verification/up.sql` (+5 -0) ➕ `migrations/postgresql/2019-11-17-011009_add_email_verification/down.sql` (+1 -0) ➕ `migrations/postgresql/2019-11-17-011009_add_email_verification/up.sql` (+5 -0) ➕ `migrations/sqlite/2019-11-17-011009_add_email_verification/down.sql` (+1 -0) ➕ `migrations/sqlite/2019-11-17-011009_add_email_verification/up.sql` (+5 -0) 📝 `src/api/core/accounts.rs` (+170 -5) 📝 `src/api/core/two_factor/email.rs` (+2 -18) 📝 `src/api/identity.rs` (+29 -0) 📝 `src/auth.rs` (+58 -0) 📝 `src/config.rs` (+11 -0) 📝 `src/crypto.rs` (+16 -0) 📝 `src/db/models/device.rs` (+2 -1) 📝 `src/db/models/user.rs` (+11 -1) 📝 `src/db/schemas/mysql/schema.rs` (+5 -0) 📝 `src/db/schemas/postgresql/schema.rs` (+6 -1) 📝 `src/db/schemas/sqlite/schema.rs` (+5 -0) 📝 `src/mail.rs` (+80 -1) ➕ `src/static/templates/email/change_email.hbs` (+6 -0) _...and 13 more files_ </details> ### 📄 Description - [x] Settings -> Change Email: Send out change verification emails and validate token (also validate against domain whitelist, if applicable) - [x] In password hint email: Add a link to account recovery page where user can request a delete account verification email, and when they click the enclosed link then the account gets deleted (e.g. they cannot remember the password at all) - [x] Main vault page: Show "Verify Email" tile and send verification email when button is clicked, and mark account as validated when link is clicked - [x] Send welcome email upon registration (with verification link, if verification is required) - [x] Reject login after signup if email verification is required and the user hasn't verified it yet. Send a few reminders if they attempt to login later. - [x] Add schema changes for pgsql and mysql --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 18:27:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3636