feat(reset_password): add invitation and reset password activation basic flow

This commit is contained in:
Matthieu Bessat 2024-12-02 18:39:00 +01:00
parent b956bdbf05
commit 8d20cab18f
14 changed files with 328 additions and 20 deletions

View file

@ -1,18 +1,18 @@
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id TEXT PRIMARY KEY,
handle TEXT NOT NULL UNIQUE,
full_name TEXT,
email TEXT UNIQUE,
website TEXT,
picture BLOB,
roles TEXT NOT NULL, -- json array of user roles
id TEXT PRIMARY KEY,
handle TEXT NOT NULL UNIQUE,
full_name TEXT,
email TEXT UNIQUE,
website TEXT,
picture BLOB,
roles TEXT NOT NULL, -- json array of user roles
status TEXT CHECK(status IN ('Active','Disabled')) NOT NULL DEFAULT 'Disabled',
password_hash TEXT,
activation_token TEXT,
last_login_at DATETIME,
created_at DATETIME NOT NULL
status TEXT CHECK(status IN ('Invited', 'Active', 'Disabled')) NOT NULL DEFAULT 'Disabled',
password_hash TEXT,
reset_password_token TEXT,
last_login_at DATETIME,
created_at DATETIME NOT NULL
);
DROP TABLE IF EXISTS authorizations;