This integration focuses on Google Firebase and is using the Google APIs Node.js Client for interacting with the Google Firebase resources.
- Create a Google account.
- Create Firebase project.
- Log in to the Firebase console, then click Add project.
- Go to Project Settings
- Go to Service Acounts tab
- Click "Create Service Account"
- After the service account is created, click "Generate new private key"
- In the pop-up, click "Generate key"
- Flatten the key and generate .env file by running
yarn create-env-file ~/SERVICE_ACCOUNT_FILE_PATH_HERE.json
The Google Cloud service account key file should be a flattened JSON string.
The following is an example of an unflattened service account key file:
{
"type": "service_account",
"project_id": "PROJECT_ID",
"private_key_id": "...",
"private_key": "...",
"client_email": "...",
"client_id": "...",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "..."
}
A helper script can be run that will automatically generate the .env
file in
the correct format:
yarn create-env-file ~/SERVICE_ACCOUNT_FILE_PATH_HERE.json