1.3.2 • Published 8 months ago

@passageidentity/webauthnutils v1.3.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

webauthnutils

NPM Version NPM Type Definitions NPM License Static Badge

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.