A lightweight frontend SDK that enables seamless integration of passkey authentication into your existing authentication solutions, powered by AuthAction (https://authaction.com).
This SDK provides a simple interface to add passkey-based authentication to your applications while working alongside your existing authentication systems. It allows you to leverage the security benefits of passkeys without having to completely replace your current authentication infrastructure.
- Simple and intuitive API
- TypeScript support with type definitions
- Modern ES modules and CommonJS support
- Zero dependencies (except for browser WebAuthn API)
- Comprehensive error handling
- Integration with AuthAction's passkey authentication service
npm install @authaction/passkey-plus-sdk
import { PasskeyPlus } from "@authaction/passkey-plus-sdk";
// Initialize with your AuthAction tenant credentials
const passkeyPlus = new PasskeyPlus({
tenantDomain: "your-tenant.authaction.com",
appId: "your-app-id",
});
// Start passkey registration process
await passkeyPlus.register("transaction-id", {
authenticatorAttachment: "platform", // or 'cross-platform'
});
// Authenticate using an existing passkey
await passkeyPlus.authenticate("transaction-id", {
isConditionalMediation: true,
});
// Check if passkey authentication is available
const canAuthenticate = await passkeyPlus.canAuthenticateWithPasskey();
const canRegister = await passkeyPlus.canRegisterPasskey();
const canUseConditionalMediation =
await passkeyPlus.canUseConditionalMediation();
The SDK uses standard JavaScript errors. You can catch and handle any errors that occur during passkey operations:
try {
await passkeyPlus.register("transaction-id");
} catch (error) {
// Handle any errors that occur during passkey operations
console.error("Error:", error);
}
This SDK works with any modern browser that supports the WebAuthn API. It's compatible with:
- Chrome
- Firefox
- Safari
- Edge
For more information about passkeys and AuthAction's authentication solutions, visit AuthAction's website.