FirebaseAuthAdapter class
Model adapter with FirebaseAuth available.
Firebase application settings must be completed in advance and FirebaseCore.initialize must be executed.
Basically, the default FirebaseAuth.instance
is used, but it is possible to use a specified authentication database by passing database when creating the adapter.
You can initialize Firebase by passing options.
FirebaseAuthを利用できるようにしたモデルアダプター。
事前にFirebaseのアプリ設定を済ませておくこととFirebaseCore.initializeを実行しておきます。
基本的にデフォルトのFirebaseAuth.instance
が利用されますが、アダプターの作成時にdatabaseを渡すことで指定された認証データベースを利用することが可能です。
optionsを渡すことでFirebaseの初期化を行うことができます。
- Inheritance
-
- Object
- AuthAdapter
- FirebaseAuthAdapter
- Annotations
Constructors
-
FirebaseAuthAdapter.new({FirebaseOptions? options, FirebaseOptions? iosOptions, FirebaseOptions? androidOptions, FirebaseOptions? webOptions, FirebaseOptions? windowsOptions, FirebaseOptions? macosOptions, FirebaseOptions? linuxOptions, String? androidPackageName, String? iOSBundleId, int? androidMinimumVersion, Locale defaultLocale = const Locale("en", "US"), FirebaseAuth? database, String? debugUserId, List<
AuthActionQuery> authActions = const []}) -
Model adapter with FirebaseAuth available.
const
Properties
-
activeProviderIds
→ List<
String> ? -
Please return a list of IDs of authenticated providers.
no setteroverride
- androidMinimumVersion → int?
-
The smallest version of Android.
final
- androidOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
- androidPackageName → String?
-
Android package name.
final
-
authActions
→ List<
AuthActionQuery> -
Callbacks during authentication.
finalinherited
- database → FirebaseAuth
-
The instance of FirebaseAuth used within the adapter.
no setter
- debugUserId → String?
-
User ID for debugging.
final
- defaultLocale → Locale
-
Default locale when Locale is not set.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- iOSBundleId → String?
-
IOS Bundle ID.
final
- iosOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
- isAnonymously → bool
-
For anonymous or guest authentication, return
true
.no setteroverride - isSignedIn → bool
-
If you are signed in, return
true
.no setteroverride - isVerified → bool
-
Return
true
if the registration has been authenticated.no setteroverride - isWaitingConfirmation → bool
-
Return
true
if confirmSignIn or confirmChange is required.no setteroverride - linuxOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
- macosOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
- options → FirebaseOptions?
-
Options for initializing Firebase.
no setter
- refreshToken → String?
-
Returns a refresh token used during sign-in and authentication.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userEmail → String?
-
Make sure to return the user's email address.
no setteroverride
- userId → String?
-
When signing in, make sure to return the user ID on the authentication platform.
no setteroverride
- userName → String?
-
Make sure to return the user name.
no setteroverride
- userPhoneNumber → String?
-
Be sure to return the user's phone number.
no setteroverride
- userPhotoURL → String?
-
Please make sure to return the URL of the user's icon image.
no setteroverride
- webOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
- windowsOptions → FirebaseOptions?
-
Options for initializing Firebase.
final
Methods
-
accessToken(
{bool forceRefresh = false}) → Future< AccessTokenValue?> -
Returns the access token used during sign-in and authentication.
override
-
change(
{required ChangeAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
Used to change the registered information.
override
-
confirmChange(
{required ConfirmChangeAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
If you change with ChangePhoneNumberAuthProvider, for example, you need to check the authentication code you received from an email or SMS.
In that case, use this method to finalize the change.
override
-
confirmSignIn(
{required ConfirmSignInAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
If you signIn with EmailLinkSignInAuthProvider or SmsSignInAuthProvider, you need to check the authentication code received from email or SMS.
In that case, use this method to finalize the sign-in.
override
-
create(
{required CreateAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< String?> -
Register users by passing a class inheriting from CreateAuthProvider in
provider
.override -
delete(
{required VoidCallback onUserStateChanged}) → Future< void> -
Deletes already registered users.
override
-
dispose(
) → void -
Discard the adapter.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reauth(
{required ReAuthProvider provider}) → Future< bool> -
If you are signed in, this is used to perform an authentication check just before changing information for authentication (e.g., email address).
override
-
register(
{required RegisterAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
Register a user by passing a class inheriting from RegisterAuthProvider in
provider
.override -
reset(
{required ResetAuthProvider provider}) → Future< void> -
Used to reset the password.
override
-
signIn(
{required SignInAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
Sign-in is performed by passing a class inheriting from SignInAuthProvider as
provider
.override -
signOut(
{required VoidCallback onUserStateChanged}) → Future< void> -
Sign out if you are already signed in.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
tryRestoreAuth(
{required VoidCallback onUserStateChanged, bool retryWhenTimeout = false}) → Future< bool> -
Running the application at startup will automatically re-authenticate the user.
override
-
verify(
{required VerifyAuthProvider provider, required VoidCallback onUserStateChanged}) → Future< void> -
Used to prove possession of the e-mail address.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override