-
Notifications
You must be signed in to change notification settings - Fork 3
User Authentication
Dikshali edited this page Sep 25, 2019
·
2 revisions
User can create an account in the application, by filling in details like Name, email, password, city, gender and these details are stored in Firebase (Firebase Auth for email and password, Firebase Database for other details, Firebase Storage for images).
If the user already has an account, they can sign in using the username and password.
If the user forgets password, can click on forgot password link where user will receive an appropriate email to change the password.
Firebase Auth
-
signInWithEmailAndPassword
method is used when signing in where email and password is verified with the one in system. -
createUserWithEmailAndPassword
method is used when signing up in the system, It adds the user and in return we get the UID for the user, which is used in storing other details in Firebase Database and Storage. - If the user is already signed in,
onStart
of the activity Firebase User is created by fetching the current user and directly open the application instead of getting Login activity.