初次提交
Build VoiceHub FPK / build-fpk (push) Failing after 56m5s
Build and Push Docker Image / build-and-push (push) Canceled after 1h9m35s

This commit is contained in:
2026-09-06 08:19:02 +08:00
commit 4ce4649aaf
1061 changed files with 337258 additions and 0 deletions
@@ -0,0 +1,17 @@
import { generateAuthenticationOptions } from '@simplewebauthn/server'
import { setWebAuthnChallenge } from '~~/server/utils/webauthn-token'
import { getWebAuthnConfig } from '~~/server/utils/webauthn-config'
export default defineEventHandler(async (event) => {
const { rpID } = getWebAuthnConfig(event)
const options = await generateAuthenticationOptions({
rpID,
userVerification: 'preferred',
allowCredentials: [],
})
setWebAuthnChallenge(event, options.challenge, 'authentication')
return options
})