pub struct PasskeyRow {
pub id: Id,
pub name: Option<String>,
pub public_key: String,
pub user_id: Id,
pub credential_id: String,
pub counter: i64,
pub device_type: String,
pub backed_up: bool,
pub transports: Option<String>,
pub created_at: OffsetDateTime,
pub aaguid: Option<String>,
}Expand description
A row of passkey: one registered WebAuthn credential. The columns are Better Auth’s, in
snake case, so a Better Auth passkey table carries over.
Fields§
§id: Id§name: Option<String>The name the user gave it, if any.
public_key: StringThe credential’s COSE public key, base64 (Better Auth’s encoding).
user_id: Id§credential_id: StringThe credential id, base64url without padding: what browsers send as id.
counter: i64The authenticator’s signature counter as of the last sign-in. Zero for authenticators that don’t count (most synced passkeys).
device_type: StringsingleDevice, or multiDevice when the credential may be synced (backup eligible).
backed_up: boolWhether the credential is backed up (synced) right now.
transports: Option<String>The browser’s transport hints, comma-separated (internal,hybrid).
created_at: OffsetDateTime§aaguid: Option<String>The authenticator model’s AAGUID, all zeros when the authenticator hides it.
Implementations§
Source§impl PasskeyRow
impl PasskeyRow
Sourcepub const ID: Col<PasskeyRow, Id>
pub const ID: Col<PasskeyRow, Id>
The id column.
Sourcepub const PUBLIC_KEY: Col<PasskeyRow, String>
pub const PUBLIC_KEY: Col<PasskeyRow, String>
The credential’s COSE public key, base64 (Better Auth’s encoding).
Sourcepub const USER_ID: Col<PasskeyRow, Id>
pub const USER_ID: Col<PasskeyRow, Id>
The user_id column.
Sourcepub const CREDENTIAL_ID: Col<PasskeyRow, String>
pub const CREDENTIAL_ID: Col<PasskeyRow, String>
The credential id, base64url without padding: what browsers send as id.
Sourcepub const COUNTER: Col<PasskeyRow, i64>
pub const COUNTER: Col<PasskeyRow, i64>
The authenticator’s signature counter as of the last sign-in. Zero for authenticators that don’t count (most synced passkeys).
Sourcepub const DEVICE_TYPE: Col<PasskeyRow, String>
pub const DEVICE_TYPE: Col<PasskeyRow, String>
singleDevice, or multiDevice when the credential may be synced (backup eligible).
Sourcepub const BACKED_UP: Col<PasskeyRow, bool>
pub const BACKED_UP: Col<PasskeyRow, bool>
Whether the credential is backed up (synced) right now.
Sourcepub const TRANSPORTS: Col<PasskeyRow, Option<String>>
pub const TRANSPORTS: Col<PasskeyRow, Option<String>>
The browser’s transport hints, comma-separated (internal,hybrid).
Sourcepub const CREATED_AT: Col<PasskeyRow, OffsetDateTime>
pub const CREATED_AT: Col<PasskeyRow, OffsetDateTime>
The created_at column.