Describe the issue
I’m building a serverless app (AWS Lambda) using @simplewebauthn/server
To avoid cold-start latency and runtime network calls to the FIDO MDS, I'd like to pre-fetch the MDS data at build time and then bundle the statements into the Lambda. When the Lambda starts, I can then pass in the pre-fetched statements to the initialize method using the functionality that exists today via the statements parameter.
Currently there’s no public API to either:
- Trigger the MDS download to obtain the parsed statements using the downloadBlob; or
- Read the populated statementCache after calling
MetadataService.initialize()
Code Samples + WebAuthn Options and Responses
Something along the lines of:
import { MetadataService } from "@simplewebauthn/server";
const statements = await MetadataService.downloadBlob();
// or
await MetadataService.initialize();
const statements = MetadataService.statements;
What do you think?