From ded636ba0cdd60d8e60d333001e8d13b5683910b Mon Sep 17 00:00:00 2001 From: Matt Portune <59324545+mportune-bw@users.noreply.github.com> Date: Wed, 8 Sep 2021 10:32:53 -0400 Subject: [PATCH] Possible fix for blocked nav on some devices (#1181) I have a device that is blocking navigation (per chrome dev tools) on the success callback for reasons unknown. After comparing with the captcha connector (which works flawlessly), the only difference I can find is that captcha doesn't do anything else after `document.location.replace` for mobile. I'm not sure if this is the culprit but it can't hurt to try. --- src/connectors/webauthn.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/connectors/webauthn.ts b/src/connectors/webauthn.ts index 3564645e3b..1a7642bcd3 100644 --- a/src/connectors/webauthn.ts +++ b/src/connectors/webauthn.ts @@ -156,9 +156,8 @@ function success(assertedCredential: PublicKeyCredential) { document.location.replace(callbackUri + '?data=' + encodeURIComponent(dataString)); } else { parent.postMessage('success|' + dataString, parentUrl); + sentSuccess = true; } - - sentSuccess = true; } function info(message: string) {