Skip to content

Commit eb4a891

Browse files
committed
feat: add email verification via Resend on registration
1 parent 888423d commit eb4a891

7 files changed

Lines changed: 698 additions & 445 deletions

File tree

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@ CAP_SECRET=change_me
2727
# Session & Cookie
2828
COOKIE_SECRET=change_me_to_a_random_string
2929

30+
# Resend (email)
31+
RESEND_API_KEY=re_xxxxxxxxx
32+
RESEND_FROM_EMAIL=noreply@your-domain.com
33+
3034
# Logging
3135
LOG_LEVEL=info

config/migrate.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const tables = {
1818
{ name: 'token_version', def: 'INT NOT NULL DEFAULT 0' },
1919
{ name: 'avatar', def: 'VARCHAR(255) DEFAULT NULL' },
2020
{ name: 'ptero_client_api_key', def: 'VARCHAR(255) DEFAULT NULL' },
21+
{ name: 'email_verified', def: 'TINYINT(1) NOT NULL DEFAULT 0' },
22+
{ name: 'verification_token', def: 'VARCHAR(64) DEFAULT NULL' },
23+
{ name: 'verification_token_expires', def: 'DATETIME DEFAULT NULL' },
2124
{ name: 'created_at', def: 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP' },
2225
],
2326
},

0 commit comments

Comments
 (0)