0
0
Firebasecloud~20 mins

Email/password login in Firebase - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Firebase Email/Password Login Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
1:30remaining
What happens when a user tries to sign in with an unregistered email?

Using Firebase Email/Password login, what is the expected behavior if a user attempts to sign in with an email that is not registered?

AFirebase signs in the user anonymously without a password.
BFirebase ignores the request and returns no response.
CFirebase automatically creates a new user with that email.
DFirebase returns an error indicating the user does not exist.
Attempts:
2 left
💡 Hint

Think about how Firebase handles sign-in attempts with unknown emails.

security
intermediate
2:00remaining
Which Firebase rule protects user data from unauthorized access?

In Firebase Realtime Database or Firestore, which security rule ensures that users can only read and write their own data after email/password login?

Aallow read, write: if request.auth.email_verified == false;
Ballow read, write: if request.auth != null && request.auth.uid == resource.data.userId;
Callow read, write: if request.time < timestamp.date(2025, 1, 1);
Dallow read, write: if request.auth.token.admin == true;
Attempts:
2 left
💡 Hint

Consider how to restrict access to only the authenticated user's own data.

Configuration
advanced
1:30remaining
What is the correct Firebase config snippet to enable email/password sign-in?

Which configuration snippet correctly enables email/password sign-in method in Firebase Authentication?

Afirebase.auth().enableEmailPassword(true);
Bfirebase.auth().settings.signInMethod = 'emailPassword';
CIn Firebase Console, under Authentication > Sign-in method, enable Email/Password toggle.
Dfirebase.auth().useDeviceLanguage(); firebase.auth().signInWithEmailAndPassword(email, password);
Attempts:
2 left
💡 Hint

Think about where sign-in methods are enabled in Firebase.

Architecture
advanced
2:00remaining
Which architecture best secures user passwords in Firebase Authentication?

How does Firebase Authentication handle user passwords to keep them secure?

APasswords are hashed and salted securely by Firebase Authentication service.
BPasswords are stored in plain text in Firebase database for quick access.
CPasswords are encrypted on the client and sent as encrypted blobs to Firebase.
DPasswords are stored in user metadata fields accessible by developers.
Attempts:
2 left
💡 Hint

Consider industry best practices for password storage.

Best Practice
expert
2:30remaining
What is the recommended way to handle failed login attempts to prevent brute force attacks?

In Firebase Email/Password login, what is the best practice to protect against repeated failed login attempts?

AUse Firebase's built-in rate limiting and monitor suspicious activity via Firebase Console.
BImplement Firebase Authentication triggers to lock accounts after multiple failed attempts.
CRequire users to change their password after every failed login attempt.
DDisable email/password login and only allow anonymous sign-in.
Attempts:
2 left
💡 Hint

Think about Firebase's native protections and monitoring tools.