added new otp table

This commit is contained in:
Artemis 2025-03-16 18:48:40 +01:00
parent dffdc779e1
commit e01df6266c

11
migrations/8_totp.sql Normal file
View 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
);