AuthServiceImpl class
- Implemented types
Constructors
-
AuthServiceImpl({required FirebaseApp firebaseApp, Future<
void> onAuthenticated(String? uid)?, Future<void> onLoggedOut()?, Future<void> onAboutToLogOut()?, List<Future< ? onAuthenticatedCallbacks, List<void> Function(String? uid)>Future< ? onLoggedOutCallbacks, List<void> Function()>Future< ? onAboutToLogOutCallbacks, List<void> Function()>PrioritizedCallback< ? onAuthenticatedPrioritized, List<Future< >void> Function(String? uid)>PrioritizedCallback< ? onLoggedOutPrioritized, List<Future< >void> Function()>PrioritizedCallback< ? onAboutToLogOutPrioritized})Future< >void> Function()>
Properties
- authCallable ↔ HttpsCallable
-
getter/setter pair
- currentFbUser ↔ User?
-
getter/setter pairoverride
- currentFbUserCredentials ↔ UserCredential?
-
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmailVerified → bool
-
Check if current user's email is verified
no setteroverride
-
isLoggedInStream
→ Stream<
bool> -
Stream that emits true when user is logged in, false when logged out
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accessCodeCheckIfValid(
String code) → Future< Either< RepositoryFailure, (AccessCodeCheckReturn, String)> > -
override
-
accessCodeIsValidCached(
) → Future< Either< RepositoryFailure, bool> > -
override
-
accessCodeRegisterWithEmailAndPassword(
String email, String password) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
addOnAboutToLogOutCallback(
Future< void> callback(), {int priority = 0}) → void -
Add a callback to be invoked BEFORE logout while still authenticated.
override
-
addOnAuthenticatedCallback(
Future< void> callback(String? uid), {int priority = 0}) → void -
Add a callback to be invoked when user authenticates.
override
-
addOnLoggedOutCallback(
Future< void> callback(), {int priority = 0}) → void -
Add a callback to be invoked AFTER logout is complete.
override
-
checkIfSignedInAndLoginAnonymouslyIfNot(
) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
dispose(
) → void -
forceRefreshAuthState(
) → Future< bool> -
getUserClaims<
T extends Enum> ({required List< T> enumValues, bool forceRefresh = false}) → Future<Map< T, bool> > -
Pass the UserClaims type to get the claims for that user
override
-
handleAuthStateChanges(
User? fbUser) → Future< void> -
handleTokenChanges(
User? fbUser) → Future< void> -
isEmailUser(
String email) → Future< Either< AuthServiceSignInFailure, bool> > -
override
-
isLoggedInAsync(
) → Future< bool> -
override
-
linkEmailPassword(
String email, String password) → Future< Either< AuthServiceLinkFailure, Unit> > -
Link anonymous account to email/password credentials
override
-
loginWithCode(
String code) → Future< Either< AuthServiceSignInFailure, LoginCodeResponse> > -
override
-
loginWithPhone(
String phoneNumber, {required Function verificationCompleted, required dynamic verificationFailed(PhoneAuthError), required Function codeSent, required Function codeAutoRetrievalTimeout, required bool codeResend}) → Future< Either< PhoneAuthError, Unit> > -
override
-
loginWithPhoneVerifyCode(
String smsCode) → Future< Either< PhoneAuthError, bool> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reauthenticateWithPassword(
String password) → Future< Either< AuthServiceSignInFailure, Unit> > -
Re-authenticate current user with password for sensitive operations
override
-
registerUserWithEmailAndPassword(
String email, String password) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
registerUserWithJustEmail(
String email) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
reloadUser(
) → Future< Either< AuthServiceSignInFailure, Unit> > -
Reload user data to get latest email verification status
override
-
removeOnAboutToLogOutCallback(
Future< void> callback()) → bool -
Remove a previously added logout callback.
Returns true if the callback was found and removed.
override
-
removeOnAuthenticatedCallback(
Future< void> callback(String? uid)) → bool -
Remove a previously added authenticated callback.
Returns true if the callback was found and removed.
override
-
removeOnLoggedOutCallback(
Future< void> callback()) → bool -
Remove a previously added logged out callback.
Returns true if the callback was found and removed.
override
-
resetPassword(
String email) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
sendEmailVerification(
) → Future< Either< AuthServiceEmailVerificationFailure, Unit> > -
Send email verification to current user
override
-
sendLoginEmail(
String email) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
setPassword(
String newPassword) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
signInWithCustomToken(
String customToken) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
signInWithDevOnly(
) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
signInWithEmail(
String email) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
signInWithEmailAndPassword(
String email, String password) → Future< Either< AuthServiceSignInFailure, Unit> > -
override
-
signOut(
{bool useFbAuthAlso = true}) → Future< Either< AuthServiceSignOutFailure, Unit> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePassword(
String newPassword) → Future< Either< AuthServiceSignInFailure, Unit> > -
Update the current user's password
override
-
validateEmailLink(
String link, {String? email}) → Future< Either< AuthServiceEmailLinkFailure, Unit> > -
override
-
waitForCanCheckLoginState(
) → Future< bool> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited