fix(api): 🐛 patch passkey counter update
This commit is contained in:
parent
cdcffff098
commit
5cb7142824
|
@ -118,8 +118,7 @@ export const handler: SessionHandlers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { newCounter } = authenticationInfo
|
const { newCounter } = authenticationInfo
|
||||||
|
const newPasskey = { ...passkey, counter: newCounter }
|
||||||
passkey.counter = newCounter
|
|
||||||
|
|
||||||
// Update credential store
|
// Update credential store
|
||||||
const [credential] = await db.ressource.credential.list(
|
const [credential] = await db.ressource.credential.list(
|
||||||
|
@ -133,7 +132,7 @@ export const handler: SessionHandlers = {
|
||||||
|
|
||||||
// Save credential to db
|
// Save credential to db
|
||||||
await db.ressource.credential.set([
|
await db.ressource.credential.set([
|
||||||
credential.update({ store: passkey }),
|
credential.update({ store: newPasskey }),
|
||||||
])
|
])
|
||||||
|
|
||||||
// log user
|
// log user
|
||||||
|
|
Loading…
Reference in a new issue