johndpjr / AgTern

19 stars 5 forks source link

Setup OAuth login infrastructure #121

Closed johndpjr closed 12 months ago

johndpjr commented 1 year ago

Context

Now that we want to track jobs, we need to have some kind of authentication lest bad actors access sensitive user data. Since CAS didn't seem to be an effective solution (#112), we should use OAuth instead. OAuth is just an authentication protocol that is highly secure and allows us to authenticate and access user data without having their passwords. This is done via implicit login flows (think of when you login via Google on 3rd-party websites; we are doing essentially the same thing).

TODO

Notes

You won't need to touch the frontend here. Use the FastAPI OAuth docs to get started with this. It will give you a good starting point. Remember to add any additional dependencies to the requirements.txt file. Please let me know if you have any roadblocks- I've done a bit of this so far.

JeremyEastham commented 1 year ago

I created a basic (non-OAuth) username and password authentication API during TAMUhack. It's not connected to a database, but it might be useful to use as a reference or a starting point: https://github.com/kalratanav/tamuhack_project/blob/main/backend/api/api.py