Firebase icon

Firebase

Interact with Firebase Admin SDK

Overview

This node integrates with the Firebase Admin SDK to manage user authentication data programmatically. Specifically, the "Create User" operation under the "Authentication" resource allows you to create a new user in your Firebase project with various attributes such as email, password, display name, phone number, and account status flags.

Common scenarios where this node is beneficial include:

  • Automating user onboarding workflows by creating users in Firebase when they register on an external platform.
  • Syncing user accounts from other systems into Firebase for unified authentication management.
  • Bulk user creation during migrations or administrative tasks.

For example, you could use this node to create a new user after receiving a signup form submission, setting their email, password, and optionally marking their email as verified or disabling the account until further verification.

Properties

Name Meaning
Email The email address for the new user
Password The password for the new user
Display Name The display name for the new user
Phone Number The phone number for the new user
Email Verified Whether the user's email is marked as verified (true/false)
Disabled Whether the user account is disabled (true/false), preventing login

Output

The output JSON contains the newly created user's details returned by Firebase, including fields like uid, email, displayName, phoneNumber, emailVerified, disabled, creationTime, and lastSignInTime. Timestamps are converted to ISO 8601 string format.

Example output structure (simplified):

{
  "uid": "string",
  "email": "string",
  "displayName": "string",
  "phoneNumber": "string",
  "emailVerified": true,
  "disabled": false,
  "creationTime": "2024-06-01T12:00:00.000Z",
  "lastSignInTime": "2024-06-10T08:30:00.000Z"
}

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Firebase service account JSON credential configured in n8n to authenticate with Firebase Admin SDK.
  • The node depends on the Firebase Admin SDK's Authentication module.
  • Proper permissions must be granted to the service account to manage users in the Firebase project.

Troubleshooting

  • Invalid service account JSON format: Ensure the provided Firebase service account JSON is correctly formatted and complete.
  • Failed to initialize Firebase: Check that the credentials have sufficient permissions and the Firebase project exists.
  • Operation not supported: Verify that the selected operation is spelled correctly and supported by the node.
  • Invalid custom claims JSON format (not applicable here but relevant for other operations): When providing custom claims, ensure the JSON is valid.
  • If the node throws errors related to missing parameters (e.g., email or password), verify all required inputs are provided.
  • Network or permission issues may cause failures; confirm network connectivity and Firebase IAM roles.

Using the "Continue On Fail" option can help process multiple items even if some fail.

Links and References

Discussion