# @passageidentity/webauthnutils

> A utility library for helping navigate UX decisions around WebAuthn built by Passage by 1Password.

Latest version **1.4.2** (published 2025-02-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @passageidentity/webauthnutils
pnpm add @passageidentity/webauthnutils
yarn add @passageidentity/webauthnutils
bun add @passageidentity/webauthnutils
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2025-02-10 |
| First published | 2023-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^18 \|\| ^20 \|\| ^21 \|\| ^ 22 |
| Dependencies | 1 |
| Unpacked size | 217.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Passage by 1Password |
| Maintainers | colehecht, apobletts, kevinflanagan, passageamy, jennmacfarlane, rickypadilla, passage-blayne, passenger_mac, sina.seylani |
| Keywords | JavaScript, TypeScript, authentication, passkeys, passwordless, WebAuthn, 1Password, Passage, passage-sdk |

## Links

- npm: https://www.npmjs.com/package/@passageidentity/webauthnutils
- Homepage: http://docs.passage.id/
- Issues: https://github.com/passageidentity/.github/blob/main/SUPPORT.md
- npm.io page: https://npm.io/package/@passageidentity/webauthnutils

## Dependencies (1)

- [ua-parser-js](https://npm.io/package/ua-parser-js.md) ^1.0.35

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.4.2 (latest) — 2025-02-10
- 1.4.1 — 2025-01-27
- 1.4.0 — 2024-12-17
- 1.3.2 — 2024-10-25
- 1.3.1 — 2024-09-26
- 1.3.0 — 2024-09-05
- 1.2.0 — 2024-06-20
- 1.1.6 — 2024-04-01
- 1.1.5 — 2024-04-01
- 1.1.4 — 2024-03-28
- 1.1.3 — 2024-03-13
- 1.1.2 — 2023-09-22
- 1.1.1 — 2023-06-14
- 1.1.0 — 2023-05-17
- 1.0.0 — 2023-03-30

## README

![webauthnutils](https://storage.googleapis.com/passage-docs/github-md-assets/webauthnutils.png)

![NPM Version](https://img.shields.io/npm/v/%40passageidentity%2Fwebauthnutils)
![NPM Type Definitions](https://img.shields.io/npm/types/%40passageidentity%2Fwebauthnutils)
![NPM License](https://img.shields.io/npm/l/%40passageidentity%2Fwebauthnutils)
![Static Badge](https://img.shields.io/badge/Built_by_1Password-grey?logo=1password)


## About

[Passage by 1Password](https://1password.com/product/passage) unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the [WebAuthn API](https://blog.1password.com/what-is-webauthn/), and allows you to implement passkeys with ease. 

Use [Passkey Flex](https://docs.passage.id/flex) to add passkeys to an existing authentication experience.

Use [Passkey Complete](https://docs.passage.id/complete) as a standalone passwordless auth solution.

Use [Passkey Ready](https://docs.passage.id/passkey-ready) to determine if your users are ready for passkeys.



<br />

### 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
```shell
npm i @passageidentity/webauthnutils
```

### Import
```js
import { CreateCredentialUtils, GetCredentialUtils } from '@passageidentity/webauthnutils'
```

### Implement
```js
// 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](https://github.com/passageidentity/.github/blob/main/SUPPORT.md). 

<br />

---

<p align="center">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-dark.png">
      <source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
      <img alt="Passage by 1Password Logo" src="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
    </picture>
</p>

<p align="center">
    <sub>Passage is a product by <a href="https://1password.com/product/passage">1Password</a>, the global leader in access management solutions with nearly 150k business customers.</sub><br />
    <sub>This project is licensed under the MIT license. See the <a href="LICENSE">LICENSE</a> file for more info.</sub>
</p>

---
_Source: https://npm.io/package/@passageidentity/webauthnutils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
