Skip to content

Commit

Permalink
fix: webauthn cannot register #753
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Nov 23, 2024
1 parent 2f57a6c commit 6abf682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/user/passkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func BeginPasskeyRegistration(c *gin.Context) {
}
cache.Set(buildCachePasskeyRegKey(u.ID), sessionData, passkeyTimeout)

c.JSON(http.StatusOK, options)
c.JSON(http.StatusOK, options.Response)
}

func FinishPasskeyRegistration(c *gin.Context) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/views/preference/components/AddPasskey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const regLoading = ref(false)
async function registerPasskey() {
regLoading.value = true
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)
Expand Down

0 comments on commit 6abf682

Please sign in to comment.