WebAuthn初步接好

This commit is contained in:
2022-08-08 02:07:27 +08:00
parent 50934228ef
commit 30b38e3f4b
16 changed files with 1329 additions and 5 deletions

14
resources/js/webauthn.js Normal file
View File

@ -0,0 +1,14 @@
import {useRegistration, useLogin} from '@web-auth/webauthn-helper'
const webauthn_register = useRegistration({
actionUrl: "/user/webauthn/",
optionsUrl: "/user/webauthn/options",
})
const webauthn_login = useLogin({
actionUrl: "/login/webauthn/",
optionsUrl: "/login/webauthn/options",
})
window.webauthn_register = webauthn_register
window.webauthn_login = webauthn_login