# iso-passkeys

> Passkeys tooling.

Latest version **0.3.2** (published 2026-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install iso-passkeys
pnpm add iso-passkeys
yarn add iso-passkeys
bun add iso-passkeys
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2026-09-26 |
| First published | 2023-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 70 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Hugo Dias <hugomrdias@gmail.com> (hugodias.me) |
| Maintainers | hugomrdias |
| Keywords | webauthn, passkeys, authentication, fido |

## Links

- npm: https://www.npmjs.com/package/iso-passkeys
- Repository: hugomrdias/iso-repo
- Homepage: https://github.com/hugomrdias/iso-repo/tree/main/packages/iso-passkeys
- npm.io page: https://npm.io/package/iso-passkeys

## Dependencies (6)

- [cbor-x](https://npm.io/package/cbor-x.md) ^1.6.6
- [iso-did](https://npm.io/package/iso-did.md) ^2.1.1
- [iso-base](https://npm.io/package/iso-base.md) ^4.4.0
- [@noble/ed25519](https://npm.io/package/@noble/ed25519.md) ^3.2.0
- [@peculiar/asn1-ecc](https://npm.io/package/@peculiar/asn1-ecc.md) ^2.9.5
- [@peculiar/asn1-schema](https://npm.io/package/@peculiar/asn1-schema.md) ^2.9.5

## 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

- 0.3.2 (latest) — 2026-09-26
- 0.3.1 — 2025-09-29
- 0.3.0 — 2025-08-27
- 0.2.2 — 2023-09-05
- 0.2.1 — 2023-07-25
- 0.2.0 — 2023-06-29
- 0.1.6 — 2023-05-25
- 0.1.5 — 2023-05-15
- 0.1.1 — 2023-05-15
- 0.1.0 — 2023-05-11
- 0.0.1 — 2023-05-11

## README

# iso-passkeys [![NPM Version](https://img.shields.io/npm/v/iso-passkeys.svg)](https://www.npmjs.com/package/iso-passkeys) [![License](https://img.shields.io/npm/l/iso-passkeys.svg)](https://github.com/hugomrdias/iso-repo/blob/main/license) [![iso-passkeys](https://github.com/hugomrdias/iso-repo/actions/workflows/iso-passkeys.yml/badge.svg)](https://github.com/hugomrdias/iso-repo/actions/workflows/iso-passkeys.yml)

> Isomorphic passkeys tooling

## Install

```bash
pnpm install iso-passkeys
```

## Usage

```js
import { credentialsCreate, credentialsGet, supports } from 'iso-passkeys'

const credential = await credentialsCreate({
  publicKey: {
    challenge: base64url.encode(new Uint8Array([1, 2, 3, 4])),
    rp: {
      id: 'example.com',
      name: 'Example',
    },
    user: {
      id: user.id,
      name: username,
      displayName: 'Joe Doe',
    },
    attestation: 'none',
    authenticatorSelection: {
      userVerification: 'required',
      requireResidentKey: true,
      residentKey: 'required',
    },
    extensions: {
      credProps: true,
      largeBlob: {
        support: 'preferred',
      },
      prf: {
        eval: {
          first: new Uint8Array(Array.from({ length: 32 }).fill(1)).buffer,
          second: new Uint8Array(Array.from({ length: 32 }).fill(1)).buffer,
        },
      },
    },
  },
})

const assertion = await credentialsGet({
  mediation: 'conditional',
  publicKey: {
    challenge: base64url.encode(new Uint8Array([1, 2, 3, 4])),
    allowCredentials: [],
    userVerification: 'required',
    rpId: 'example.com',
    extensions: {
      largeBlob: {
        // read: true,
        write: utf8.decode('hello world').buffer,
      },
      prf: {
        eval: {
          first: utf8.decode('first-salt').buffer,
          second: utf8.decode('second-salt').buffer,
        },
      },
    },
  },
})
```

## Docs

Check <https://hugomrdias.github.io/iso-repo/modules/iso_passkeys.html>

## License

MIT © [Hugo Dias](http://hugodias.me)

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