Skip to content

ncouture/oidc-middleware

Repository files navigation

Table of Contents

  1. Document "Installation"
  2. Build
  3. Developers
    1. gcloud development environment
    2. pre-commit hooks
    3. test coverage
  4. Firestore
    1. Start the local emulation server
    2. Custom authentication
  5. References

[aw]sgi firestore middleware

TODO Document "Installation"

Build

Install bazel as described on https://docs.bazel.build/versions/3.7.0/install.html

Developers

gcloud development environment

# appengine enables the datastore API that's firestore
gcloud services enable appengine.googleapis.com
# generate
gcloud alpha firestore databases create --project=project-id --region=region

pre-commit hooks

pip install -r requirements-dev.txt
pre-commit install

test coverage

interrogate -v .

Firestore

Start the local emulation server

export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"

Custom authentication

Generate a Service Account credentials by visiting

Firebase Console > Project Settings > Service Accounts

click on GENERATE NEW PRIVATE KEYS.

You will need it in the firestore/exampletokengenerator/auth.html.

References