AuthServiceImpl class

Implemented types

Constructors

AuthServiceImpl({required FirebaseApp firebaseApp, required bool useFirebaseFCM, Future<void> onAuthenticated(String? uid)?, Future<void> onRefreshed()?, Future<void> onLoggedOut()?})

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
onAuthenticated Future<void> Function(String? uid)?
getter/setter pair
onLoggedOut Future<void> Function()?
getter/setter pair
onRefreshed Future<void> Function()?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useFirebaseFCM bool
Whether to use Firebase FCM for push notifications This is the general setting, which can be disabled by the app config setting, but not overridden to enable FCM by the app config.
getter/setter pair

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
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>
initFCM() 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
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
override
waitForCanCheckLoginState() Future<bool>
override

Operators

operator ==(Object other) bool
The equality operator.
inherited