Challenge - 5 Problems
Firebase Integration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Firebase Initialization Behavior
What happens if you try to initialize Firebase twice in the same web app without checking if it is already initialized?
Attempts:
2 left
💡 Hint
Think about how Firebase protects against multiple initializations in a single app instance.
✗ Incorrect
Firebase SDK throws an error if you try to initialize it more than once without checking, to prevent conflicts.
❓ Configuration
intermediate2:00remaining
Correct Firebase Config Object
Which of the following is a valid Firebase configuration object for initializing Firebase in a web app?
Attempts:
2 left
💡 Hint
Look for the exact property names Firebase expects in its config.
✗ Incorrect
Firebase requires specific keys like apiKey, authDomain, and projectId to initialize properly.
❓ Architecture
advanced3:00remaining
Firebase Hosting and Cloud Functions Integration
You want to serve a static website and also run backend code on Firebase. Which architecture correctly uses Firebase Hosting and Cloud Functions together?
Attempts:
2 left
💡 Hint
Think about which Firebase service is optimized for static content and which for backend logic.
✗ Incorrect
Firebase Hosting is optimized for static content delivery, while Cloud Functions handle backend logic via HTTPS triggers.
❓ security
advanced3:00remaining
Firebase Security Rules for Firestore
Which Firestore security rule allows only authenticated users to read and write their own user document under 'users/{userId}'?
Firebase
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /users/{userId} { allow read, write: if ________ ; } } }
Attempts:
2 left
💡 Hint
Users should only access their own documents and must be signed in.
✗ Incorrect
The rule checks that the user is signed in and the document ID matches their user ID.
❓ service_behavior
expert3:00remaining
Firebase Realtime Database Offline Behavior
What happens when a Firebase Realtime Database client loses internet connection but continues to write data locally?
Attempts:
2 left
💡 Hint
Consider Firebase's offline capabilities and automatic synchronization.
✗ Incorrect
Firebase Realtime Database caches writes locally and syncs them automatically once online.