database: added totp codes migrations, get/add/use token
This commit is contained in:
parent
f891d2f940
commit
8658966b41
10 changed files with 229 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
drop table if exists totp_login_requests;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
create table if not exists totp_login_requests
|
||||
(
|
||||
-- info
|
||||
token TEXT not null primary key,
|
||||
user TEXT not null references users (id),
|
||||
|
||||
-- timings
|
||||
created_at TEXT not null default CURRENT_TIMESTAMP,
|
||||
expires_at TEXT not null,
|
||||
used_at TEXT
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue