Repository navigation
@bkey/login v0.1.0
First release of @bkey/login — Login with bkey: drop-in, passwordless, phishing-resistant OIDC sign-in for websites and apps.
npm install @bkey/loginWhat's in it
- Self-serve client registration (RFC 7591) —
registerClient()gets you aclient_id/client_secretwith no dashboard and no account, plus the full dynamic client lifecycle:getRegisteredClient(),updateRegisteredClient(),rotateClientSecret(),deleteRegisteredClient(),claimRegisteredClient(), anduploadRegisteredClientLogo(). - PKCE flow helpers and id_token verification —
createBkeyLogin()handles the authorization request, the code exchange, andjwtVerifyagainst the issuer's remote JWKS. - Auth.js provider preset —
import { BkeyProvider } from '@bkey/login/authjs'.
Verification posture
id_token verification pins a static algorithms: ['EdDSA'] allowlist that is deliberately not derived from the discovery document, so a tampered doc cannot widen the accepted algorithms. exp and iat are required explicitly rather than validated only-when-present, and discovery and registration reject redirects under a shared five-second deadline.
The default issuer is https://id.bkey.id. Note that auth.bkey.id serves a discovery document declaring "issuer": "https://id.bkey.id", so pointing a client at auth.bkey.id fails with issuer_mismatch in any conformant client — use id.bkey.id.
Requirements
Node >= 20. Depends on jose 6.x.
Provenance
Published from GitHub Actions with npm provenance, so the tarball carries a signed attestation linking it to this release's workflow run and commit. Verify with npm audit signatures.
See CHANGELOG.md for the full entry.