pub trait OAuthStateBackend: Send + Sync {
// Required methods
fn put(&self, token: &str, provider: &str, expires_at: u64);
fn take(&self, token: &str, now_unix_secs: u64) -> Option<String>;
}Expand description
Backing store for OAuth state tokens. Default impl keeps them in memory
(fine for tests + dev); the runtime swaps in a SQLite-backed impl so a
restart in the middle of an OAuth handshake doesn’t leave the user with
“invalid state” on the callback. Same pattern as SessionBackend.