obtainAccessCredentialsViaUserConsentManual function
Future<AccessCredentials>
obtainAccessCredentialsViaUserConsentManual(
- ClientId clientId,
- List<
String> scopes, - Client client,
- PromptUserForConsentManual userPrompt, {
- String? hostedDomain,
- AuthEndpoints authEndpoints = const GoogleAuthEndpoints(),
Obtain oauth2 AccessCredentials using the oauth2 authentication code flow.
The clientId
that you obtain from the API Console
Credentials page,
as described in
Obtain OAuth 2.0 credentials.
userPrompt
will be used for directing the user/user-agent to a URI. See
PromptUserForConsentManual for more information.
client
will be used for making the HTTP requests needed to create the
returned AccessCredentials.
If provided, restricts sign-in to Google Apps hosted accounts at
hostedDomain
. For more details, see
https://developers.google.com/identity/protocols/oauth2/openid-connect#hd-param
Implementation
Future<AccessCredentials> obtainAccessCredentialsViaUserConsentManual(
ClientId clientId,
List<String> scopes,
Client client,
PromptUserForConsentManual userPrompt, {
String? hostedDomain,
AuthEndpoints authEndpoints = const GoogleAuthEndpoints(),
}) =>
AuthorizationCodeGrantManualFlow(
authEndpoints,
clientId,
scopes,
client,
userPrompt,
hostedDomain: hostedDomain,
).run();