Skip to main content
Version: v1

getPasskeys

The getPasskeys function enables your app to get a list of all passkeys currently bound to the device, for example to create a user experience for selecting a passkey.

Dependencies​

The getPasskeys function requires the Beyond Identity Javascript SDK.

npm install @beyondidentity/bi-sdk-js

Prerequisites​

Before making a call to getPasskeys, you must complete the following prerequisite calls:

  1. Import the required types and functions from the SDK
import {Embedded} from '@beyondidentity/bi-sdk-js';
  1. Initialize the SDK
const embedded = await Embedded.initialize();

Parameters​

none

Returns​

Upon success, returns a Promise that resolves to an array of Passkey.

Examples​

Example: Call getPasskeys and surface the list to the user to select a passkey​

const allPasskeys = await embedded.getPasskeys();