Auth doesn't work in production, but works locally

Hey @enlguy. You should not need to manage environment variables manually with Vercel Postgres. The integration creates the variables in your project settings and automatically syncs the values for you.

I often use the runtime logs to investigate issues with a deployment. There’s a lot of info there if you click an log record to expand for more details. Try/catch statements can be very helpful along with these logs.

A 500 is a very generic error, so that’s not much to go on. If there’s an associated error code, like ``, then you can look it up in the Error Codes list to get tips for how to fix it. There should also be a link directly to the troubleshooting tips from the error page if you see one thrown by your project.

The 404 means something is missing or in an unexpected location. I’ve written a longer post with tips for debugging this kind of error. Please give these a try: Debugging 404 Errors