@passlock/node v0.9.12
See also
For frontend usage please see the accompanying @passlock/client package
Features
Passkeys and the WebAuthn API are quite complex. We've taken an opinionated approach to the implementation and feature set to simplify things for you. Following the 80/20 principle we've tried to focus on the features most valuable to developers and users. We welcome feature requests so do get in touch.
๐ Primary or secondary authentication - Replace password based logins with passkeys, or use passkeys alongside passwords for secondary authentication.
โ๐ป Biometrics - We've made it really easy to implement facial or fingerprint recognition in your webapps.
๐ Step up authentication - Require biometric or PIN verification for some actions e.g. changing account details, whilst allowing frictionless authentication for others.
๐ฅ๏ธ Full management console - Manage all security related aspects of your userbase through a web based console.
๐ต๏ธ Audit trail - View a full audit trail for each user: when they add a new passkey, when they login, verify their email address and much more.
Screenshot
Requirements
Node 16+
Usage
Generate a secure token in your frontend then use this API to obtain the passkey registration or authentication details:
import { Passlock } from '@passlock/node'
const passlock = new Passlock({ tenancyId, apiKey })
// token comes from your frontend
const principal = await passlock.fetchPrincipal({ token })
// get the user id
console.log(principal.user.id)