Firebase Helper Files (backend.firebase_helpers) - DSGT-DLP/Deep-Learning-Playground GitHub Wiki
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.py
)
Firebase (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
authenticate.py
)
Authentication (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.