This project is a Node.js script that allows you to import user data from Firebase Authentication using the Firebase Admin SDK.
Before running this script, make sure you have completed the following steps:
- Download the Firebase Admin SDK service account key from the Firebase console.
- Save the service account key JSON file to a secure location in your project directory.
To install the necessary dependencies, follow these steps:
-
If you don't have npm installed, you can install it by running the following command in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Next install Node.js by running the following command in your terminal:
brew install node
Clone this repository to your local machine and install the required dependencies by running the following command:
npm install
Assign variable serviceAccount with the service account key JSON file path in the index.js file.
const serviceAccount = require('path/to/serviceAccountKey.json');
To run the script, use the following command:
npm start
The script will import the user Authentication data from Firebase to the outputfile
variable value in the root directory of the project.