pub trait AccountStore: Send + Sync {
// Required methods
fn create_account<'life0, 'async_trait>(
&'life0 self,
account: NewAccount,
) -> Pin<Box<dyn Future<Output = Result<Account, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn find_by_provider<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
provider_id: &'life1 str,
account_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn find_by_user_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn delete_account<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn update_account<'life0, 'async_trait>(
&'life0 self,
id: i64,
access_token: Option<String>,
refresh_token: Option<String>,
access_token_expires_at: Option<OffsetDateTime>,
scope: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Storage backend for OAuth account records.