DriveAuthManager

Obtains authorization for the Drive appDataFolder scope via Play Services AuthorizationClient. This is separate from the passkey/Credential-Manager flow but resolves to the same Google account the user picks at consent.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun authorize(): AuthorizeOutcome

Request the drive.appdata scope. Returns AuthorizeOutcome.Authorized when consent already exists (silent), or AuthorizeOutcome.NeedsConsent carrying an IntentSender the UI must launch.

Link copied to clipboard

Returns a drive.appdata access token without UI, or throws if consent has not been granted yet. Use from headless paths (e.g. the dust backup coordinator during a routine refresh) — the first-time consent must come from a UI flow (DriveAuthManager.authorize + launching the IntentSender).

Link copied to clipboard
abstract fun tokenFromConsent(data: Intent?): DriveAuth

Extract the token from the consent activity result Intent.