/ferroadmin

Firebase admin for ferrorod front-end starter kit. This starter kit consist of ferrofunctions, ferrorod, and ferroadmin

Primary LanguageTypeScript

Ferro Admin Service (Node.js)

This is a web service that provides some back-end functionality for the Ferror Rod web and mobile apps. It is implemented using the Firebase Admin SDK for Node.js.

Prerequisites

  • Node.js 6.0 or higher
  • NPM 5.0 or higher

Application Features

  • ID token verificiation
  • Firestore access
  • Setting and retrieving custom claims on user accounts

Testing Locally

  1. Download a service account key file from your Firebase project, and place it at the root of this Git repository. Rename the file to serviceAccountKey.json.

    See https://console.firebase.google.com/project/regenfarm-380c2/settings/serviceaccounts/adminsdk

  2. Install the dependencies.

$ npm install
  1. Build the server app.
$ npm run build
  1. List users
npm run listUsers
  1. Get user information
npm run user <email>
  1. Grant user a role
npm run grant <anonymous | basic | prime | admin> <email>

TODO

  1. List users