signInWithIdp method
Future<FirebaseAccount>
signInWithIdp(
- IdpProvider provider,
- Uri requestUri, {
- bool autoRefresh = true,
Signs into firebase with an IDP-Provider.
This logs the user into firebase by using an IdpProvider - aka google,
facebook, twitter, etc. As long as the provider has been enabled in the
firebase console, it can be used. If the passed provider
and
requestUri
are valid, the associated firebase account is returned or a
new one gets created. On a failure, an AuthException is thrown instead.
If autoRefresh
is enabled (the default), the created accounts
FirebaseAccount.autoRefresh is set to true as well, wich will start an
automatic token refresh in the background, as soon as the current token
comes close to expiring. See FirebaseAccount.autoRefresh for more
details.
Implementation
Future<FirebaseAccount> signInWithIdp(
IdpProvider provider,
Uri requestUri, {
bool autoRefresh = true,
}) async =>
FirebaseAccount.apiCreate(
api,
await api.signInWithIdp(
IdpSignInRequest(
postBody: provider.postBody,
requestUri: requestUri,
),
),
autoRefresh: autoRefresh,
locale: locale,
);