feat(auth): harden authentication with argon2 passwords and rotating hashed refresh tokens
This commit is contained in:
@@ -488,15 +488,15 @@ export class IdpRegistrationStepper extends DeesElement {
|
||||
username: this.storedData.email,
|
||||
password: eventArg.detail.data.password,
|
||||
});
|
||||
this.storedData.refreshToken = loginResponse.refreshToken;
|
||||
|
||||
deesForm.setStatus('pending', 'Obtaining JWT...');
|
||||
const jwtResponse = await idpState.idpClient.requests.obtainJwt.fire({
|
||||
refreshToken: this.storedData.refreshToken,
|
||||
});
|
||||
const jwt = await idpState.idpClient.refreshJwt(loginResponse.refreshToken);
|
||||
|
||||
if (!jwt) {
|
||||
deesForm.setStatus('error', 'Failed to establish a login session.');
|
||||
return;
|
||||
}
|
||||
|
||||
deesForm.setStatus('success', 'Ok! Lets Go!');
|
||||
await idpState.idpClient.setJwt(jwtResponse.jwt);
|
||||
idpState.domtools.router.pushUrl('/account');
|
||||
}, { signal });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user