feat: PasswordResetBegin of auth controller;
fix: sql query updateLoginInformationByUsername used in-database hashing; refactor: renamed LogOutAccounts into LogOutSessions in models/auth; refactor: added error checks on opening transactions for all auth service methods; refactor: added error checks on commiting transactions likewise; refactor: simplified PasswordResetBegin logic; feat: implemented PasswordResetComplete method of auth service;
This commit is contained in:
@@ -174,13 +174,7 @@ VALUES ( $1, $2, @password_hash::text ) RETURNING *;
|
||||
UPDATE login_informations
|
||||
SET
|
||||
email = COALESCE($2, email),
|
||||
password_hash = COALESCE(
|
||||
CASE
|
||||
WHEN @password::text IS NOT NULL
|
||||
THEN crypt(@password::text, gen_salt('bf'))
|
||||
END,
|
||||
password_hash
|
||||
),
|
||||
password_hash = COALESCE(@password_hash::text, password_hash),
|
||||
totp_encrypted = COALESCE($4, totp_encrypted),
|
||||
email_2fa_enabled = COALESCE($5, email_2fa_enabled),
|
||||
password_change_date = COALESCE($6, password_change_date)
|
||||
|
||||
Reference in New Issue
Block a user