- added api UserController.ts for 2FA
Some checks failed
CI Pipeline / japa-tests (push) Failing after 56s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 56s
- added PersonalTotpSettings.vue vor enablin/disabling 2FA - changed User.ts: added attributes: state, twoFactorSecret and twoFactorRecoveryCodes - added resources/js/utils/toast.ts for notifications - modified start/routes/api.ts - npm updates
This commit is contained in:
parent
18635f77b3
commit
ebc62d9117
18 changed files with 1151 additions and 315 deletions
|
@ -16,6 +16,8 @@ export default class Accounts extends BaseSchema {
|
|||
table.timestamp('updated_at');
|
||||
table.text("two_factor_secret").nullable();
|
||||
table.text("two_factor_recovery_codes").nullable();
|
||||
table.smallint('state').nullable();
|
||||
table.bigint('last_counter').nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -39,8 +41,47 @@ export default class Accounts extends BaseSchema {
|
|||
// CONSTRAINT accounts_email_unique UNIQUE (email)
|
||||
// two_factor_secret text COLLATE pg_catalog."default",
|
||||
// two_factor_recovery_codes text COLLATE pg_catalog."default",
|
||||
// state smallint,
|
||||
// last_counter bigint,
|
||||
// )
|
||||
|
||||
// ALTER TABLE gba.accounts
|
||||
// ADD COLUMN two_factor_secret text COLLATE pg_catalog."default",
|
||||
// ADD COLUMN two_factor_recovery_codes text COLLATE pg_catalog."default";
|
||||
// ADD COLUMN two_factor_recovery_codes text COLLATE pg_catalog."default",
|
||||
// ADD COLUMN state smallint,
|
||||
// ADD COLUMN last_counter bigint;
|
||||
|
||||
|
||||
|
||||
|
||||
// CREATE TABLE IF NOT EXISTS gba.totp_secrets
|
||||
// (
|
||||
// id integer NOT NULL,
|
||||
// user_id integer NOT NULL,
|
||||
// state smallint,
|
||||
// last_counter bigint,
|
||||
// two_factor_secret text COLLATE pg_catalog."default",
|
||||
// two_factor_recovery_codes text COLLATE pg_catalog."default",
|
||||
// created_at timestamp(0) without time zone,
|
||||
// updated_at timestamp(0) without time zone,
|
||||
// CONSTRAINT totp_secrets_pkey PRIMARY KEY (id),
|
||||
// CONSTRAINT totp_secrets_user_id_foreign FOREIGN KEY (user_id)
|
||||
// REFERENCES gba.accounts (id) MATCH SIMPLE
|
||||
// ON UPDATE CASCADE
|
||||
// ON DELETE CASCADE
|
||||
// );
|
||||
|
||||
// CREATE SEQUENCE IF NOT EXISTS gba.totp_secrets_id_seq
|
||||
// INCREMENT 1
|
||||
// START 1
|
||||
// MINVALUE 1
|
||||
// MAXVALUE 2147483647
|
||||
// CACHE 1
|
||||
// OWNED BY gba.totp_secrets.id;
|
||||
|
||||
// ALTER SEQUENCE gba.totp_secrets_id_seq
|
||||
// OWNER TO tethys_admin;
|
||||
|
||||
// GRANT ALL ON SEQUENCE gba.totp_secrets_id_seq TO tethys_admin;
|
||||
|
||||
// ALTER TABLE gba.totp_secrets ALTER COLUMN id SET DEFAULT nextval('gba.totp_secrets_id_seq');
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue