From 130a6b8f7d298508c0e2b20f538799bba627f37c Mon Sep 17 00:00:00 2001 From: Steve Hobbs Date: Thu, 10 Feb 2022 13:38:04 +0000 Subject: [PATCH] Distinguish authorizeTimeout from just timeout --- src/Auth0Client.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 81e2fb248..d14332fc6 100644 --- a/src/Auth0Client.ts +++ b/src/Auth0Client.ts @@ -1078,9 +1078,6 @@ export default class Auth0Client { response_mode: 'web_message' }); - const timeout = - options.timeoutInSeconds || this.options.authorizeTimeoutInSeconds; - try { // When a browser is running in a Cross-Origin Isolated context, using iframes is not possible. // It doesn't throw an error but times out instead, so we should exit early and inform the user about the reason. @@ -1092,7 +1089,10 @@ export default class Auth0Client { ); } - const codeResult = await runIframe(url, this.domainUrl, timeout); + const authorizeTimeout = + options.timeoutInSeconds || this.options.authorizeTimeoutInSeconds; + + const codeResult = await runIframe(url, this.domainUrl, authorizeTimeout); if (stateIn !== codeResult.state) { throw new Error('Invalid state');