diff --git a/app/javascript/packs/webauthn-setup.js b/app/javascript/packs/webauthn-setup.js index 782bf5e719a..158b4010309 100644 --- a/app/javascript/packs/webauthn-setup.js +++ b/app/javascript/packs/webauthn-setup.js @@ -69,7 +69,8 @@ function webauthn() { excludeCredentials: excludeCredentialsArray, }, }; - if (!(navigator && navigator.credentials && navigator.credentials.create)) { + if (location.href.indexOf('?error=') === -1 && + !(navigator && navigator.credentials && navigator.credentials.create)) { window.location.href = '/webauthn_setup?error=NotSupportedError'; } const continueButton = document.getElementById('continue-button');