diff --git a/lib/src/helpers/authentication-helper.ts b/lib/src/helpers/authentication-helper.ts index 1b1af8b5..ec2f96cb 100644 --- a/lib/src/helpers/authentication-helper.ts +++ b/lib/src/helpers/authentication-helper.ts @@ -291,7 +291,9 @@ export class AuthenticationHelper { parsedResponse.created_at = new Date().getTime(); - if ((await this._config()).validateIDToken) { + const shouldValidateIdToken: boolean | undefined = (await this._config()).validateIDToken; + + if (shouldValidateIdToken) { return this.validateIdToken(parsedResponse.id_token).then(async () => { await this._dataLayer.setSessionData(parsedResponse, userID);