mirror of
https://github.com/Noratrieb/oh-oh.git
synced 2026-01-16 09:55:06 +01:00
2fa
This commit is contained in:
parent
730cf9d176
commit
34f9302061
10 changed files with 239 additions and 34 deletions
|
|
@ -4,6 +4,7 @@ CREATE TABLE IF NOT EXISTS sessions (
|
|||
user_id INTEGER NOT NULL,
|
||||
created INTEGER NOT NULL,
|
||||
user_agent TEXT NOT NULL,
|
||||
locked_2fa INTEGER NOT NULL, -- whether the session is currently locked and needs a 2FA code to unlock it
|
||||
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
) STRICT;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
CREATE TABLE IF NOT EXISTS used_totp (
|
||||
user_id INTEGER,
|
||||
code TEXT,
|
||||
time_step INTEGER,
|
||||
|
||||
PRIMARY KEY (user_id, code),
|
||||
PRIMARY KEY (user_id, time_step),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
) STRICT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue