This repository collect all cloud functions, that should be deployed to Firebase project.
- userCreatedHandler -- handle user creation from Firebase Authentication and send new user data to the server.
- userDeletedHandler -- handle user deletion from Firebase Authentication and send this info to the server.
- Set up environment properties. Use
/functions/.env
file for configuring them localy or Firebase Console for configurating them on Firebase server. See Configuration properties to understand how you should configure your properties. - For running in emulator:
- Build sources using
npm run build
command. - Run emulator using
firebase emulators:start --only auth,functions --project "$PROJECT_ID"
command.
- Build sources using
- For deploying to the Firebase servers:
- Run
npm run deploy
in project folder.
- Run
Endpoint on which functions should make a requests.
Example: http://localhost:8080/graphql
Secret token for authenticating on server (this is not a user bearer token, this is separate static token for Cloud Functions).
Example: simple-firebase-function-token