Firebase Authentication Service
class FirebaseAuthenticationService(defaultDispatcher: CoroutineDispatcher = Dispatchers.IO) : AuthenticationService
Content copied to clipboard
A concrete implementation of AuthenticationService that makes use of Firebase.
Constructors
Link copied to clipboard
fun FirebaseAuthenticationService(defaultDispatcher: CoroutineDispatcher = Dispatchers.IO)
Content copied to clipboard
Functions
Link copied to clipboard
open suspend override fun createAccount( username: String, email: String, password: String, profilePhotoUri: Uri?): AuthenticationResult
Content copied to clipboard
Used to create a new user account with the provided username, email,password and an optional profilePhotoUri. An instance of AuthenticationResult will be returned to indicate whether an account was successfully created or not.
Link copied to clipboard
open suspend override fun signIn(email: String, password: String): AuthenticationResult
Content copied to clipboard
Used to sign in a user with the provided email and password. An instance of AuthenticationResult will be returned to indicate a successful or failed sign-in attempt.
Link copied to clipboard
open suspend override fun updateAttributeForUser(user: ExamerUser, updateAttribute: AuthenticationService.UpdateAttribute): AuthenticationResult
Content copied to clipboard
Used to update an attribute of the specified user. The UpdateAttribute param of the function will be used to specify the attribute to update. An instance of AuthenticationResult will be returned to indicate whether the update was successful.