Changeset d43230f in Klonkt
- Timestamp:
- 07/21/2026 01:17:03 AM (7 weeks ago)
- Branches:
- main
- Children:
- 6cbd014
- Parents:
- 9e9e6f9
- git-author:
- Robin Genis <roboburr@…> (07/21/2026 01:17:02 AM)
- git-committer:
- Robin <roboburr@…> (07/21/2026 01:17:03 AM)
- File:
-
- 1 edited
-
src/services/PasskeyService.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/PasskeyService.js
r9e9e6f9 rd43230f 7 7 import crypto from 'crypto'; 8 8 import db from '../config/database.js'; 9 import { generateRegistrationOptions, verifyRegistrationResponse } from '@simplewebauthn/server'; 9 10 // Lazy so a not-yet-installed dependency can never crash app boot; only the 11 // paid passkey flow fails until `npm ci` has run. 12 let _lib = null; 13 async function lib() { if (!_lib) _lib = await import('@simplewebauthn/server'); return _lib; } 10 14 11 15 const DEFAULT_TTL_DAYS = 32; // aligns with Patreon's monthly cycle; re-link after … … 21 25 export async function registrationOptions(base, siteSlug) { 22 26 const { rpID } = rpFor(base); 27 const { generateRegistrationOptions } = await lib(); 23 28 return generateRegistrationOptions({ 24 29 rpName: `Supporter of ${siteSlug}`, … … 39 44 let v; 40 45 try { 46 const { verifyRegistrationResponse } = await lib(); 41 47 v = await verifyRegistrationResponse({ 42 48 response,
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)