Closed dwu359 closed 1 year ago
Hello @dwu359! Thank you for submitting the Feature Request Form. We appreciate your contribution. :wave:
We will look into it and provide a response as soon as possible.
To work on this feature request, you can follow these branch setup instructions:
Checkout the main branch:
git checkout nextjs
Pull the latest changes from the remote main branch:
git pull origin nextjs
Create a new branch specific to this feature request using the issue number:
git checkout -b feature-910
Feel free to make the necessary changes in this branch and submit a pull request when you're ready.
Best regards, Deep Learning Playground (DLP) Team
Feature Name
Add Authentication to /training
Your Name
Daniel Wu
Description
The training backend currently doesn't have authentication for its endpoints. Use Django Ninja's auth features https://django-ninja.rest-framework.com/guides/authentication/ with
firebase-admin
to use firebase user id tokens as JWTs to verify the user for every endpoint in /training.The frontend currently puts these id tokens in the
Authorization
header using theBearer
authentication scheme.Edit: Additionally, there is a temporary cli that you can use that is
training/cli.py
to get id-tokens and uids for dev purposes.poetry run python cli.py --help
for more infoEdit2: Make sure that once the user's token is verified, the uid is obtained from the token and returned in a way that is somehow accessible by the endpoints.