Netlify Identity redirects me to my production URL when I log in locally

I have a Next.js (React) app running locally with netlify dev.

I use the Netlify Identity with the netlify-identity-widget.

I can successfully log in, however, I always get redirected to my remote/production URL when I click on the “Login in” button in the modal.

Any ideas why my app does not stay at localhost?

hi there paolo,

good news and bad news:

good news is we have some other threads that seem to describe the same/similar to what you are seeing:

that said, i am not sure we have a fix/answer for you in any of those threads - but maybe there is a workaround hidden in there somewhere?

1 Like