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
|
||||
|
||||
passkey.counter = newCounter
|
||||
const newPasskey = { ...passkey, counter: newCounter }
|
||||
|
||||
// Update credential store
|
||||
const [credential] = await db.ressource.credential.list(
|
||||
|
@ -133,7 +132,7 @@ export const handler: SessionHandlers = {
|
|||
|
||||
// Save credential to db
|
||||
await db.ressource.credential.set([
|
||||
credential.update({ store: passkey }),
|
||||
credential.update({ store: newPasskey }),
|
||||
])
|
||||
|
||||
// log user
|
||||
|
|
Loading…
Reference in a new issue