mirror of
https://github.com/openvk/openvk
synced 2024-11-16 03:59:19 +03:00
e433e83c5d
This commit adds full TOTP 2FA. And even backup codes modeled on the original VK
11 lines
409 B
SQL
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`);
|