DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
24 stars 8 forks source link

[FEATURE]: Add Auth to /training #910

Closed dwu359 closed 1 year ago

dwu359 commented 1 year ago

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 the Bearer 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 info

Edit2: 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.

github-actions[bot] commented 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:

  1. Checkout the main branch:

     git checkout nextjs
  2. Pull the latest changes from the remote main branch:

     git pull origin nextjs
  3. 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