fix(api): 🐛 patch passkey counter update

This commit is contained in:
Julien Oculi 2024-06-24 16:06:03 +02:00
parent cdcffff098
commit 5cb7142824

View file

@ -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