Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3
Added Firebase auth validator that checks if a valid token is in request header and either:
a) Retrieves user from firebase and adds it to request body if valid token is in the header.
b) Throws an error
To do this I also created the firebase initialization in utils.
Note - Now requires updated .env with service key, I will upload this to the google drive
Tested it by creating a token using the test user in the firebase auth using a python script I made(not in the push)
Example of successful token:
Example of invalid token:
Example of Token not in header: