PrayTeam / scriptured-prayer

GNU Affero General Public License v3.0
1 stars 0 forks source link

feat: rudimentary authentication #57

Closed asherlloyd closed 9 months ago

asherlloyd commented 10 months ago

Description

Resolves several items on issue #29.

Reason

To provide authentication and basic user state management. Also resolves some CORS conundrums. There are still outstanding items to resolve on #29.

How this has been tested

Tested Django build and React development server integration.

Types of changes

Screenshots

image image

Checklist:

Soyokaze-42 commented 9 months ago

I get an exception when I visit http://localhost:8000/en/api/schema/ in this branch atm

Soyokaze-42 commented 9 months ago

It seems like there is an issue between drf-spectacular and df_rest_auth. We can either go back to writing our own, trash swagger, find a setting or code to fix the issue, or find another rest auth module. I read through the drf-spectacular docs, but nothing jumped out at me as a solution.

Soyokaze-42 commented 9 months ago

@asherlloyd I found a fix for the drf-spectacular. There is a way to override the classes used to generate the schema. I'm not sure what it is replacing or adding, but it fixed the issue.

I also moved the auth api endpoint slightly (to /api/auth) so we can avoid potential future name clashes.

Soyokaze-42 commented 9 months ago

I did not update the javascript, though, so I probably broke it :(

asherlloyd commented 9 months ago

I did not update the javascript, though, so I probably broke it :(

No problem! JavaScript URLs updated to match.