Skip to main content
Version: v2

deletePasskey

The deletePasskey function enables your app to delete a passkey given its passkey ID.

Dependencies​

The deletePasskey function requires the Beyond Identity SDK.

yarn add @beyondidentity/bi-sdk-js

or

npm install @beyondidentity/bi-sdk-js

Prerequisites​

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

  1. Import the required types and functions from the SDK.

    import { Embedded } from '@beyondidentity/bi-sdk-js';
  2. Initialize the SDK.

    // --- Initialize with required arguments
    try {
    const embedded = await Embedded.initialize();
    console.log("Initialization successful", embedded);
    } catch (error) {
    console.error("Initialization failed:", error);
    }

    // --- Initialize with required and optional arguments
    const config = {
    allowedDomains: ["example.com", "another-example.com"],
    logger: function (logType, message) {
    console.log(`[${logType}] ${message}`);
    },
    };

    try {
    const embedded = await Embedded.initialize(config);
    console.log("Initialization successful", embedded);
    } catch (error) {
    console.error("Initialization failed:", error);
    }

Parameters​

ParameterTypeDescription
idstringRequired. The ID of the passkey to be deleted. This should match the id property of a Passkey that is available on the device.

Examples​

Example: Delete a passkey​

await embedded.deletePasskey(passkeyId);