foundation_auth 0.0.1

Authentication and authorization — OAuth2/OIDC flows, JWT handling, password hashing (Argon2), TOTP, and session management with Turso/SQLite and wasm-bindgen backends
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Passkey (WebAuthn credential) model.
//! Always compiled under `server` feature — needed by account management (F09)
//! for listing/deleting passkeys regardless of whether WebAuthn crypto is available.

use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Passkey {
    pub id: String,
    pub user_id: String,
    pub name: String,
    pub credential_id: Vec<u8>,
    pub credential_public_key: Vec<u8>,
    pub counter: u32,
    pub created_at: i64,
    pub last_used_at: Option<i64>,
}