Getting 500 errors suddenly whenever redirecting to /api/auth/login on nextjs 14+
Not sure what could have caused this - all works well on localhost but blows up once deployed.
My codebase has not changed besides integrating Stripe.
Any hints on how to debug this?
4 Replies
The error I see in logs is
Hi there,
Thanks for providing the error details. To help us diagnose the issue more effectively, could you please let us know:
1. Which version of the Kinde SDK are you currently using?
2. Are you deploying your app to a staging or production environment?
This information will help us pinpoint the problem. Thanks
1.
2. deploying to AWS via SST. Everything works fine on localhost.
This is the error on a bare bones implementation
Hi there,
Thanks for sharing the details. To help us further, could you please provide screenshots of your configuration settings from both your local environment and your AWS (SST) deployment? Also, are you using a custom domain in your deployment?
In the meantime, as a temporary workaround, you might try wrapping the call to the auth handler in a try/catch block to ensure a response is always returned. For example:
This can help catch errors and ensure that a valid response is returned even if something goes wrong. Once we see your configuration screenshots and learn more about your setup (including whether you’re using a custom domain), we can provide more targeted guidance.