added new otp table
This commit is contained in:
parent
dffdc779e1
commit
e01df6266c
1 changed files with 11 additions and 0 deletions
11
migrations/8_totp.sql
Normal file
11
migrations/8_totp.sql
Normal file
|
@ -0,0 +1,11 @@
|
|||
create table otp (
|
||||
user_id uuid not null,
|
||||
created_at timestamptz not null default current_timestamp,
|
||||
-- enum str on client side
|
||||
otp_method varchar(32) not null,
|
||||
-- 160bit base32-encoded key
|
||||
secret_seed char(32) not null,
|
||||
recovery_key varchar(512) not null,
|
||||
primary key (user_id, otp_method),
|
||||
foreign key (user_id) references users (id) on delete cascade
|
||||
);
|
Loading…
Add table
Reference in a new issue