heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.85k stars 5.53k forks source link

Redirects doesn't keep port number locahost #5618

Closed GuiGreg closed 11 months ago

GuiGreg commented 11 months ago

All redirect from Devise loses the port number on localhost. For example, will redirect to localhost/users/sign_in instead of localhost:8020/users/sign_in

I am running the rails app inside Docker.

carlosantoniodasilva commented 11 months ago

Devise and Responders do nothing special with redirects, they simply trigger it with the given paths, Rails should be prepending / handling the rest.

That said, it could be something with your setup that's losing the port, are you able to make other redirects work, just not within Devise? Try to debug requests and see what the request domain/host/port/fullpath is, it could give you some hints.

I don't think this is a Devise issue, but if you can provide a sample application that shows otherwise, we can take a better look.