Skip to content

Commit 6abf682

Browse files
committed
fix: webauthn cannot register #753
1 parent 2f57a6c commit 6abf682

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/user/passkey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func BeginPasskeyRegistration(c *gin.Context) {
4545
}
4646
cache.Set(buildCachePasskeyRegKey(u.ID), sessionData, passkeyTimeout)
4747

48-
c.JSON(http.StatusOK, options)
48+
c.JSON(http.StatusOK, options.Response)
4949
}
5050

5151
func FinishPasskeyRegistration(c *gin.Context) {

app/src/views/preference/components/AddPasskey.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const regLoading = ref(false)
1515
async function registerPasskey() {
1616
regLoading.value = true
1717
try {
18-
const options = await passkey.begin_registration()
18+
const optionsJSON = await passkey.begin_registration()
1919
20-
const attestationResponse = await startRegistration(options.publicKey)
20+
const attestationResponse = await startRegistration({ optionsJSON })
2121
2222
await passkey.finish_registration(attestationResponse, passkeyName.value)
2323

0 commit comments

Comments
 (0)