FirebaseAccount.apiCreate constructor
FirebaseAccount.apiCreate(
- RestApi api,
- SignInResponse signInResponse, {
- bool autoRefresh = true,
- String? locale,
Creates a new account from a successfuly sign in response and a RestApi.
Instead of using this constructor directly, prefer using one of the FirebaseAuth classes signIn/signUp methods.
The account is created by using the api
for accessing the Firebase REST
endpoints. The user credentials are extracted from the signInResponse
.
If autoRefresh
and locale
are used to initialize these properties.
Implementation
FirebaseAccount.apiCreate(
this.api,
SignInResponse signInResponse, {
bool autoRefresh = true,
this.locale,
}) : _localId = signInResponse.localId,
_idToken = signInResponse.idToken,
_refreshToken = signInResponse.refreshToken,
_expiresAt = _expiresInToAt(_durFromString(signInResponse.expiresIn)) {
this.autoRefresh = autoRefresh;
}