Browse Source

dont set keys if not there on sso (#152)

* dont set keys if not there on sso

* a comment
PS-589-2fa-device-verification-settings
Kyle Spearrin 5 years ago committed by GitHub
parent
commit
9957125d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/services/auth.service.ts

4
src/services/auth.service.ts

@ -308,6 +308,9 @@ export class AuthService implements AuthServiceAbstraction { @@ -308,6 +308,9 @@ export class AuthService implements AuthServiceAbstraction {
if (hashedPassword != null) {
await this.cryptoService.setKeyHash(hashedPassword);
}
// Skip this step during SSO new user flow. No key is returned from server.
if (code == null || tokenResponse.key != null) {
await this.cryptoService.setEncKey(tokenResponse.key);
// User doesn't have a key pair yet (old account), let's generate one for them
@ -324,6 +327,7 @@ export class AuthService implements AuthServiceAbstraction { @@ -324,6 +327,7 @@ export class AuthService implements AuthServiceAbstraction {
await this.cryptoService.setEncPrivateKey(tokenResponse.privateKey);
}
}
if (this.vaultTimeoutService != null) {
this.vaultTimeoutService.biometricLocked = false;

Loading…
Cancel
Save