Skip to main content

Ionic Capacitor SDK

The passkeyme-ionic-cap-sdk allows you to integrate Passkey authentication into your Ionic Cross-platform app, supporting Web, iOS, Android.

The convenience of this is that you don't have to install the separate SDKs

See https://www.npmjs.com/package/passkeyme-ionic-cap-plugin

Installation

Install the SDK via npm:

npm install passkeyme-web-sdk

Configuration

To use the SDK, import it and configure it in your project:

import { passkeyRegister, passkeyAuthenticate } from 'passkeyme-web-sdk';

// Example usage for registration
async function registerUser(challenge) {
try {
const result = await passkeyRegister(challenge);
console.log(result);
} catch (error) {
console.error(error);
}
}

// Example usage for authentication
async function authenticateUser(challenge) {
try {
const result = await passkeyAuthenticate(challenge);
console.log(result);
} catch (error) {
console.error(error);
}
}

For detailed information on the registration and authentication ceremonies, refer to the relevant documentation.