senekor / buenzlimarks

A simple web app for bookmark management
The Unlicense
0 stars 0 forks source link

fix auth in prod #57

Closed senekor closed 1 year ago

senekor commented 1 year ago

I have no idea why this happened in prod but not locally.

For the record, logging in as an already existing user worked fine. But when loggin in as a new user, the response was bad gateway, something our own login handler would never respond with. Meaning that, the request wouldn't even reach the handler?

But how could the router know which users already exist in the database and which don't? Truly a mistery.

Separating the frontend routes from the api routes cleanly seems to have fixed the problem. Something must've caused the router to send the request to the frontend router instead of the login handler.