Skip to content

Firebase Helper Files (backend.firebase_helpers)

Andrew Peng edited this page Aug 26, 2022 · 1 revision

About

This page contains documentation for the files in the /backend/firebase_helpers directory of the Github repo. This page is regularly updated when new changes are added to these files.

Firebase (firebase.py)

init_firebase(): Uses get_secret() to fetch the firebase secrets from AWS Secrets Manager and initializes Firebase on the backend. This is mainly used for user authentication

Authentication (authenticate.py)

authenticate(): Uses Firebase admin to verify a given id token the request ("authorization" key). The frontend must pass a dictionary with an authorization: await auth.currentUser.getIdToken(true) in the socket request. Returns true if the token is valid, and false if it is invalid.

Clone this wiki locally