Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

GoogleInstalledApplicationAuthorization

OfficeIMO.GoogleWorkspace.Auth.GoogleApis

Namespace
OfficeIMO.GoogleWorkspace.Auth.GoogleApis
Assembly
OfficeIMO.GoogleWorkspace.Auth.GoogleApis
Source revision
22fb5b2be3d2 with working tree changes
Modifiers
static

Runs Google's installed-application authorization flow with PKCE always enabled.

Inheritance

  • object
  • GoogleInstalledApplicationAuthorization

Methods

public static async Task<GoogleApisCredentialSource> AuthorizeAsync(GoogleInstalledApplicationAuthorizationOptions options, CancellationToken cancellationToken = default) #

Authorizes and returns a credential source with provider-verified identity evidence. This convenience method always requires GoogleInstalledApplicationAuthorizationOptions.CredentialBindingResolver; use GoogleInstalledApplicationAuthorization.AuthorizeCredentialAsync for a resolver-free read-only credential.

Parameters

options OfficeIMO.GoogleWorkspace.Auth.GoogleApis.GoogleInstalledApplicationAuthorizationOptions required
cancellationToken System.Threading.CancellationToken = default optional
public static async Task<UserCredential> AuthorizeCredentialAsync(GoogleInstalledApplicationAuthorizationOptions options, CancellationToken cancellationToken = default) #

Runs the PKCE installed-application flow and returns Google's native user credential.

Parameters

options OfficeIMO.GoogleWorkspace.Auth.GoogleApis.GoogleInstalledApplicationAuthorizationOptions required
Validated OAuth client, scope, user, token-store, and receiver settings.
cancellationToken System.Threading.CancellationToken = default optional
Token used to cancel interactive authorization.

Returns

Task<UserCredential> The authorized Google user credential.