Class
GoogleInstalledApplicationAuthorization
OfficeIMO.GoogleWorkspace.Auth.GoogleApis
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
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<GoogleApisCredentialSource>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
- Validated OAuth client, scope, user, token-store, and receiver settings.
- cancellationToken System.Threading.CancellationToken = default
- Token used to cancel interactive authorization.
Returns
Task<UserCredential> The authorized Google user credential.