Recall & Review
beginner
What is Firebase Authentication used for in mobile apps?
Firebase Authentication helps apps sign in users securely using email/password, phone numbers, or social accounts like Google and Facebook.
Click to reveal answer
beginner
How do you sign in a user with email and password using Firebase in Swift?
Use Auth.auth().signIn(withEmail:password:completion:) method and handle the result in a completion block to check success or error.
Click to reveal answer
intermediate
What is the purpose of the completion handler in Firebase sign-in methods?
It tells you if the sign-in succeeded or failed and provides user info or error details to handle next steps.
Click to reveal answer
beginner
How can you check if a user is already signed in when your app starts?
Check if Auth.auth().currentUser is not nil. If it has a value, a user is signed in.
Click to reveal answer
intermediate
Why is it important to handle errors during Firebase Authentication?
Handling errors helps show clear messages to users, like wrong password or network issues, improving user experience.
Click to reveal answer
Which Firebase method signs in a user with email and password in Swift?
✗ Incorrect
The correct method is Auth.auth().signIn(withEmail:password:) to sign in users with email and password.
How do you check if a user is currently signed in with Firebase?
✗ Incorrect
Auth.auth().currentUser returns the current user or nil if no user is signed in.
What should you do if Firebase sign-in returns an error?
✗ Incorrect
Showing an error message helps users understand what went wrong and how to fix it.
Which of these is NOT a sign-in method supported by Firebase Authentication?
✗ Incorrect
Fingerprint scan requires device-level setup and is not directly a Firebase sign-in method.
What does the completion handler in Firebase sign-in methods provide?
✗ Incorrect
The completion handler returns user info if sign-in succeeds or an error if it fails.
Explain how to sign in a user with email and password using Firebase Authentication in Swift.
Think about the method call and what you do after it completes.
You got /4 concepts.
Describe how your app can remember if a user is already signed in when it starts.
Firebase keeps user info between app launches.
You got /3 concepts.