1
1
Fork 0
mirror of https://github.com/openvk/openvk synced 2025-01-14 03:52:59 +03:00
openvk/install/sqls/00013-2fa.sql
Maxim Leshchenko e433e83c5d
Users: Add two-factor authentication ()
This commit adds full TOTP 2FA. And even backup codes modeled on the original VK
2021-12-02 17:31:32 +02:00

11 lines
409 B
SQL

ALTER TABLE `profiles` ADD COLUMN `2fa_secret` VARCHAR(26);
ALTER TABLE `groups` ADD COLUMN `2fa_required` BOOLEAN NOT NULL DEFAULT FALSE;
CREATE TABLE IF NOT EXISTS `2fa_backup_codes` (
`owner` bigint(20) unsigned NOT NULL,
`code` int unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `2fa_backup_codes`
ADD KEY `code` (`code`,`owner`),
ADD KEY `FK_ownerToCode` (`owner`);