Skip to content

Commit 12006e0

Browse files
Add support for handling invalid options error
1 parent ec7b7f3 commit 12006e0

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

lib/build/webauthnprebuiltui.js

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/webauthn/components/themes/signIn/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function PasskeySignInTheme(props: SignInThemeProps): JSX.Element {
4343
return response;
4444
}
4545

46-
if (response.status === "FAILED_TO_AUTHENTICATE_USER") {
46+
if (response.status === "FAILED_TO_AUTHENTICATE_USER" || response.status === "INVALID_OPTIONS_ERROR") {
4747
setError("WEBAUTHN_PASSKEY_RECOVERABLE_ERROR");
4848
return response;
4949
}

lib/ts/recipe/webauthn/components/themes/signUp/signUpForm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ export const SignUpForm = (
151151
// If it is an error related to passkey, we need to handle it.
152152
if (
153153
response.status === "FAILED_TO_REGISTER_USER" ||
154-
response.status === "AUTHENTICATOR_ALREADY_REGISTERED"
154+
response.status === "AUTHENTICATOR_ALREADY_REGISTERED" ||
155+
response.status === "INVALID_OPTIONS_ERROR"
155156
) {
156157
setErrorLabel("WEBAUTHN_PASSKEY_RECOVERABLE_ERROR");
157158
}

0 commit comments

Comments
 (0)