basalt / auth-prisma/src / PrismaPasskeyStore
Class: PrismaPasskeyStore
Defined in: auth-prisma/src/index.ts:994
PasskeyStore over the AuthPasskey model. The counter is a BigInt column (the WebAuthn counter is an unsigned 32-bit value, past Int), and transports is JSON text rather than a scalar list, so the model works on MySQL as well as PostgreSQL.
Implements
Constructors
Constructor
> new PrismaPasskeyStore(client, options?): PrismaPasskeyStore
Defined in: auth-prisma/src/index.ts:997
Parameters
client
options?
Returns
PrismaPasskeyStore
Methods
add()
> add(credential): Promise<void>
Defined in: auth-prisma/src/index.ts:1010
Parameters
credential
Returns
Promise<void>
Implementation of
compareAndSetCounter()
> compareAndSetCounter(credentialId, expected, next, lastUsedAt): Promise<boolean>
Defined in: auth-prisma/src/index.ts:1037
One conditional UPDATE: a concurrent assertion that moved the counter makes this one fail.
Parameters
credentialId
string
expected
number
next
number
lastUsedAt
number
Returns
Promise<boolean>
Implementation of
PasskeyStore.compareAndSetCounter
forUser()
> forUser(userId): Promise<PasskeyCredential[]>
Defined in: auth-prisma/src/index.ts:1031
Parameters
userId
string
Returns
Promise<PasskeyCredential[]>
Implementation of
get()
> get(credentialId): Promise<PasskeyCredential | null>
Defined in: auth-prisma/src/index.ts:1026
Parameters
credentialId
string
Returns
Promise<PasskeyCredential | null>
Implementation of
remove()
> remove(credentialId): Promise<void>
Defined in: auth-prisma/src/index.ts:1045
Parameters
credentialId
string
Returns
Promise<void>