feat(auth): use one time token instead of user id #158
This commit is contained in:
11
migration/004_user_tokens.up.sql
Normal file
11
migration/004_user_tokens.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
-- E.G. email-verifications, password-resets, unsubscribe-from-newsletter etc.
|
||||
CREATE TABLE user_token (
|
||||
user_uuid TEXT NOT NULL UNIQUE,
|
||||
|
||||
type TEXT NOT NULL,
|
||||
token TEXT NOT NULL UNIQUE PRIMARY KEY,
|
||||
|
||||
created_at DATETIME NOT NULL,
|
||||
expires_at DATETIME
|
||||
);
|
||||
Reference in New Issue
Block a user