-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Firebase Authentication to training/ Endpoints #926
Conversation
have you tried testing through postman? @alantao912 |
use cli.py to generate bearer token and verify that training endpoints work |
Make sure the public routes in |
@dwu359 do we still need the exempt paths stuff that faris mentioned? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start so far, you can add the auth for entire routers btw instead of adding auth for each endpoint
@farisdurrani @karkir0003 So Django Ninja has these things called routers which are pretty similar to flask's blueprints, we can attach auth to entire routers, and for any exempt_paths we can just put them outside of these routers or put them in a router without auth |
got it. so pretty much all.solved with django! |
Just checked, none of the exempt paths have auth headers. |
@alantao912 let us know when your PR is ready, and do update your branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. as long as u address the comments or do it in a followup pr, i conditionally approve
Very nice. Can you confirm you've tested this @alantao912 and it all works? As well as the exempt paths? |
Yes, I can confirm that all endpoints work. And exempt paths do not require authentication. @farisdurrani |
Added Firebase Authentication to training/ Endpoints
What user problem are we solving?
Insecure training endpoints.
What solution does this PR provide?
Firebase authentication to secure training endpoints.
Testing Methodology
Have not tested yet.
Any other considerations
I only found two endpoints in training apart from a test API.