Consumer Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Passkeys & WebAuthn

/

Update

Update

Allows a WebAuthn registration to be updated with a different name.


Method parameters


webauthn_registration_id*string

name*string
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
{
  "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"
  }
}