whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link

OAuth2PasswordBearer endpoint wrongly defined? #25

Closed 0x108 closed 1 year ago

0x108 commented 1 year ago

Greetings,

while accessing the Swagger UI docs, I realized that the endpoint that's being used for user/password authentication is called /oauth, however in the code this can be found: reusable_oauth2 = OAuth2PasswordBearer(tokenUrl=f"{settings.API_V1_STR}/login/access-token")

When trying to login via the "Login" button in Swagger UI, a 404 Not Found is being returned - after changing the access-token occurrences in the code to oauth e.g. reusable_oauth2 = OAuth2PasswordBearer(tokenUrl=f"{settings.API_V1_STR}/login/oauth") the login in the Swagger UI works.

Thanks for reading and maintaining,

Cheers!

turukawa commented 1 year ago

Fixed by https://github.com/whythawk/full-stack-fastapi-postgresql/pull/29