@passlock/node
v0.9.30
Published
Passkey authentication and social login for node.js/express apps
Downloads
43
Maintainers
Readme
See also
For frontend usage please see the accompanying @passlock/client package
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)