@passlock/browser
| Install | |
|---|---|
npm install @passlock/browser |
|
| Latest Version: | 2.10.0 |
| License: | MIT |
| Last Updated: | Sep 17, 2026 |
| Links: | GitHub · npm |
Passkey Authentication for TypeScript apps
Next generation passkey authentication for Astro, SvelteKit, Angular and other frameworks.
Project website »
GitHub
·
Documentation
·
Quick start
·
Demo
Key Features
Powerful passkey features for browser applications.
-
🔓 No lock-in
Framework agnostic. Standards compliant. -
🔑 Domain migration
Use backend-authorized RP IDs with WebAuthn/.well-known/webauthnsupport. -
🚀 Zero config passkeys
Works out of the box with sensible defaults. -
📱 Credential management
Programmatically manage passkeys on end user devices -
💪 Powerful
User verification, autofill, roaming authenticators and more.
Register a passkey
Passkey registration starts on your backend. Use
@passlock/server to authorize a registration for the application user, return
the resulting registrationToken to the browser, then pass that token to
registerPasskey.
import { registerPasskey } from "@passlock/browser"
const result = await registerPasskey(
{ registrationToken },
{ tenancyId: "your-tenancy-id" }
)
if (result.success) {
// Send this code to your backend and verify it there.
console.log(result.value.code)
}
if (result.failure) {
console.error(result.error.message)
}
registerPasskey redeems the one-time registration token for WebAuthn
creation options, asks the authenticator to create the passkey, and verifies
the result with Passlock.
Your backend chooses the RP ID when it authorizes registration or authentication.
The browser library does not accept an RP ID directly; it uses the WebAuthn
options returned by Passlock. During domain migration, publish the RP ID
domain's /.well-known/webauthn file so browsers and authenticators can enforce
related-origin eligibility.
More information
Please see the tutorial and documentation
Related Packages
Multi-platform analytics SDK for browser, React, Next.js, Remix, Vue, Svelte, Nu...
All ~3200 Remix Icons as importable SVG strings with framework wrapper component...
integrate zikojs elements within other ui framework like vue react solidjs svelt...
Version History
| Version | Released | License |
|---|---|---|
| 2.10.0 | MIT | |
| 2.9.3 | MIT | |
| 2.9.2 | MIT | |
| 2.9.1 | MIT | |
| 2.9.0 | MIT | |
| 2.8.0 | MIT | |
| 2.7.0 | MIT | |
| 2.6.0 | MIT | |
| 2.5.3 | MIT | |
| 2.5.2 | MIT | |
| 2.5.1 | MIT | |
| 2.5.0 | MIT | |
| 2.4.3 | MIT |