Allows a WebAuthn registration to be updated with a different name.
Update
Method parameters
webauthn_registration_id* string
Globally unique UUID that identifies a Passkey or WebAuthn registration in the Stytch API. The webauthn_registration_id is used when you need to operate on a specific User's WebAuthn registration.
name* string
The name of the WebAuthn registration or Passkey.
import React, { useCallback } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytch } from '@stytch/react-native';
export const Login = () => {
const stytch = useStytch();
const trigger = useCallback(() => {
stytch.webauthn.update({
webauthn_registration_id: 'webauthn_registration_id',
name: 'WebAuthn Registration Name',
});
}, [stytch]);
return (
<View>
<TouchableOpacity onPress={trigger}>
<Text>Update WebAuthn Registration</Text>
</TouchableOpacity>
</View>
);
};
RESPONSE 200
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
"webauthn_registration": {
"webauthn_registration_id": "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
"domain": "example.com",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"authenticator_type": "platform",
"verified": true,
"name": "Google Passkey"
}
}
RESPONSE 400
200
{
"status_code": 400,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "invalid_public_key_credential",
"error_message": "Invalid public key credential. Please confirm you're passing a correctly formatted public key credential.",
"error_url": "https://stytch.com/docs/api/errors/400"
}
RESPONSE 404
200
{
"status_code": 404,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "webauthn_registration_not_found",
"error_message": "WebAuthn registration could not be found.",
"error_url": "https://stytch.com/docs/api/errors/404"
}
RESPONSE 429
200
{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}
RESPONSE 500
200
{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}