From aaf771bbdb53a19ea3a3d3a0be4b8095e533e14a Mon Sep 17 00:00:00 2001 From: Jared Snider Date: Thu, 8 Jun 2023 17:36:56 -0400 Subject: [PATCH] PM-1049 - IdTokenResponse - only userDecryptionOptions if they exist on the response from the server; I saw a few instances where it did not. Wasn't able to replicate consistently, but I put this check here to be safe. --- .../src/auth/models/response/identity-token.response.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/common/src/auth/models/response/identity-token.response.ts b/libs/common/src/auth/models/response/identity-token.response.ts index 4b6cf0f1ca..d080341ed4 100644 --- a/libs/common/src/auth/models/response/identity-token.response.ts +++ b/libs/common/src/auth/models/response/identity-token.response.ts @@ -47,8 +47,10 @@ export class IdentityTokenResponse extends BaseResponse { this.getResponseProperty("MasterPasswordPolicy") ); - this.userDecryptionOptions = new UserDecryptionOptionsResponse( - this.getResponseProperty("UserDecryptionOptions") - ); + if (response.UserDecryptionOptions) { + this.userDecryptionOptions = new UserDecryptionOptionsResponse( + this.getResponseProperty("UserDecryptionOptions") + ); + } } }