When a user signs up with email and password using Firebase Authentication, what is the immediate state of the user session?
firebase.auth().createUserWithEmailAndPassword(email, password).then(userCredential => {
// What is true here?
});Think about what Firebase does by default after creating a user.
Firebase automatically signs in the user after a successful email/password signup, so the session is active immediately.
Given Cloud Firestore with user data stored under /users/{userId}, which security rule ensures users can only read their own data?
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /users/{userId} { allow read: if request.auth.uid == userId; } } }
Users should only access data where their ID matches the data path.
The rule request.auth.uid == userId restricts read access to only the authenticated user's own data.
Which Firebase Authentication configuration snippet correctly enables email/password signup in the Firebase console?
Think about the Firebase console settings for authentication.
Enabling the 'Email/Password' provider in the Authentication sign-in method tab activates this signup method.
After a user signs up with email and password, why should you require email verification before granting full access?
Think about security and trust in user identity.
Email verification confirms the user controls the email address, reducing fake or malicious accounts.
When a signup attempt fails (e.g., weak password, email already in use), what is the best way to handle errors in your app?
firebase.auth().createUserWithEmailAndPassword(email, password).catch(error => {
// What should you do here?
});Good user experience includes clear communication.
Displaying clear messages helps users understand and fix signup issues, improving experience and reducing frustration.