2022-08-08 02:07:57 +08:00

15 lines
393 B
JavaScript

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