Skip to main content

authorize_provider

Function authorize_provider 

Source
pub async fn authorize_provider(
    provider: CloudProvider,
    cancel: Receiver<bool>,
    clock: &dyn Clock,
) -> Result<OAuthTokens, OAuthError>
Expand description

Run an OAuth authorization flow for the given cloud provider (desktop: opens a browser and captures the redirect on coven’s localhost callback server).

Returns tokens on success. Only Google Drive, Dropbox, and OneDrive support OAuth; other providers return an error.

Uses [authorize]’s localhost-callback flow; gated on oauth-providers.