feat: add ability of user to manage old tokens

This commit is contained in:
2024-04-13 16:59:08 +01:00
parent f8bc8ad85a
commit 4862e9a79e
6 changed files with 421 additions and 197 deletions

View File

@@ -11,17 +11,17 @@ create table if not exists users (
username varchar (120) not null,
email varchar (120) not null,
salt char (8) not null,
password char (60) not null,
password char (60) not null,
created_on timestamp default current_timestamp,
updated_at timestamp default current_timestamp,
lastlogin_at timestamp default current_timestamp
);
--drop table if exists tokens;
create table if not exists tokens (
token varchar (120) primary key,
user_id uuid references users (id) on delete cascade,
time_to_live integer default 86400,
name text default '',
emit_day timestamp default current_timestamp
);