When you're integrating the Frontegg login and admin box with your Next.js application that uses SSR, the Next middleware is responsible for routing and handling all requests to various Frontegg authentication routes.
If you have deployed the application and you're seeing 502 errors, please check the below:
1. Nginx proxy_buffer_size
is small by default and you might need to increase it.
2. Add FRONTEGG_LOG_LEVEL='debug'
to your .env
file to get more verbose errors and see what is being printed out in the logs from the middleware.