@passageidentity/webauthnutils
v1.4.0
Published
A utility library for helping navigate UX decisions around WebAuthn built by Passage by 1Password.
Downloads
28,241
Readme
About
Passage by 1Password unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the WebAuthn API, and allows you to implement passkeys with ease.
Use Passkey Flex to add passkeys to an existing authentication experience.
Use Passkey Complete as a standalone passwordless auth solution.
Use Passkey Ready to determine if your users are ready for passkeys.
In webauthnutils
This package contains utility functions that simplify the creation and management of WebAuthn credentials and passkeys in web applications. Also included are functions that check if the current browser supports different features of WebAuthn, including hybrid credentials and conditional UI (autofill).
Getting Started
Install
npm i @passageidentity/webauthnutils
Import
import { CreateCredentialUtils, GetCredentialUtils } from '@passageidentity/webauthnutils'
Implement
// get challenge from server
// ...
// create credential
const supportedFeatures = await CreateCredentialUtils.createCredentialAvailable();
if supportedFeatures.available {
const { credential, transports } = await CreateCredentialUtils.createCredential(
challenge
).catch((_) => {
// handle error
});
}
See inline documentation on all classes and methods for full documentation.
Support & Feedback
We are here to help! Find additional docs, the best ways to get in touch with our team, and more within our support resources.