auth_browser
library
Enums
-
ResponseType
-
Available response types that can be requested when using the implicit
browser login flow.
Functions
-
authenticatedClient(Client baseClient, AccessCredentials credentials, {bool closeUnderlyingClient = false})
→ AuthClient
-
Obtain a
Client
which automatically authenticates requests using
credentials
.
-
autoRefreshingClient(ClientId clientId, AccessCredentials credentials, Client baseClient, {AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ AutoRefreshingAuthClient
-
Creates an AutoRefreshingAuthClient which automatically refreshes
credentials
before they expire.
-
clientViaApiKey(String apiKey, {Client? baseClient})
→ Client
-
Obtains a
Client
which uses the given apiKey
for making HTTP
requests.
-
createImplicitBrowserFlow(ClientId clientId, List<String> scopes, {Client? baseClient, bool enableDebugLogs = false})
→ Future<BrowserOAuth2Flow>
-
Will create and complete with a BrowserOAuth2Flow object.
-
refreshCredentials(ClientId clientId, AccessCredentials credentials, Client client, {AuthEndpoints authEndpoints = const GoogleAuthEndpoints()})
→ Future<AccessCredentials>
-
Obtains refreshed AccessCredentials for
clientId
and credentials
.
-
requestAccessCredentials({required String clientId, required Iterable<String> scopes, String prompt = 'select_account', String? logLevel})
→ Future<AccessCredentials>
-
Obtains AccessCredentials using the
Google Identity Services
token model.
-
requestAuthorizationCode({required String clientId, required Iterable<String> scopes, String? state, String? hint, String? hostedDomain, String? logLevel})
→ Future<CodeResponse>
-
Obtains CodeResponse using the
Google Identity Services
code model.
-
revokeConsent(String accessTokenValue)
→ Future<void>
-
Revokes all of the scopes that the user granted to the app.