Complete the code to initialize the Firebase Admin SDK.
const admin = require('firebase-admin'); admin.[1]();
The initializeApp() method starts the Firebase Admin SDK so you can use its services.
Complete the code to get a Firestore database instance.
const db = admin.[1]();The firestore() method returns the Firestore database instance from the Admin SDK.
Fix the error in the code to send a message using Firebase Cloud Messaging.
const message = { token: userToken, notification: { title: 'Hello', body: 'World' } };
admin.messaging().[1](message)
.then(response => console.log('Sent:', response))
.catch(error => console.error('Error:', error));The correct method to send a message with Firebase Cloud Messaging is send().
Fill in the blank to create a new user with email and password using Firebase Admin SDK.
admin.auth().[1]({ email: userEmail, password: userPassword }) .then(userRecord => console.log('User created:', userRecord.uid)) .catch(error => console.error('Error:', error));
The method to create a new user is createUser().
Fill in the two blanks to update a user's display name and photo URL.
admin.auth().updateUser(userId, { displayName: [1], photoURL: [2] })
.then(userRecord => console.log('Updated user:', userRecord.uid))
.catch(error => console.error('Error:', error));To update user profile fields, provide string values for displayName and photoURL.
