mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
fix: webauthn cannot register #753
This commit is contained in:
parent
2f57a6c9e7
commit
6abf68261c
2 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ func BeginPasskeyRegistration(c *gin.Context) {
|
||||||
}
|
}
|
||||||
cache.Set(buildCachePasskeyRegKey(u.ID), sessionData, passkeyTimeout)
|
cache.Set(buildCachePasskeyRegKey(u.ID), sessionData, passkeyTimeout)
|
||||||
|
|
||||||
c.JSON(http.StatusOK, options)
|
c.JSON(http.StatusOK, options.Response)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FinishPasskeyRegistration(c *gin.Context) {
|
func FinishPasskeyRegistration(c *gin.Context) {
|
||||||
|
|
|
@ -15,9 +15,9 @@ const regLoading = ref(false)
|
||||||
async function registerPasskey() {
|
async function registerPasskey() {
|
||||||
regLoading.value = true
|
regLoading.value = true
|
||||||
try {
|
try {
|
||||||
const options = await passkey.begin_registration()
|
const optionsJSON = await passkey.begin_registration()
|
||||||
|
|
||||||
const attestationResponse = await startRegistration(options.publicKey)
|
const attestationResponse = await startRegistration({ optionsJSON })
|
||||||
|
|
||||||
await passkey.finish_registration(attestationResponse, passkeyName.value)
|
await passkey.finish_registration(attestationResponse, passkeyName.value)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue