From 902709d61b0b9309a72419c1cec274c4f49bb39b Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 5 Apr 2023 15:22:09 +0200 Subject: [PATCH] Added authCode table --- db/changes/231401/00-authCode.sql | 13 +++++++++++++ front/core/services/auth.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 db/changes/231401/00-authCode.sql diff --git a/db/changes/231401/00-authCode.sql b/db/changes/231401/00-authCode.sql new file mode 100644 index 000000000..8d1b48f12 --- /dev/null +++ b/db/changes/231401/00-authCode.sql @@ -0,0 +1,13 @@ +create table `salix`.`authCode` +( + userFk int UNSIGNED not null, + code int not null, + constraint authCode_pk + primary key (userFk), + constraint authCode_unique + unique (code), + constraint authCode_user_id_fk + foreign key (userFk) references account.user (id) + on update cascade on delete cascade +); + diff --git a/front/core/services/auth.js b/front/core/services/auth.js index c15a34d94..5755f8f34 100644 --- a/front/core/services/auth.js +++ b/front/core/services/auth.js @@ -24,7 +24,7 @@ export default class Auth { initialize() { let criteria = { to: state => { - const outLayout = ['login', 'recover-password', 'reset-password']; + const outLayout = ['login', 'recover-password', 'reset-password', 'validate-email']; return !outLayout.some(ol => ol == state.name); } };