문제

I'm using Omniauth in my Rails app (which is launched locally using POW). After my providers return to the callback action, I get redirect back in port 19999. I don't want to hard code the port into the redirect_to (e.g.: redirect_to root_url, :port => PORT).

I want either to get the port dynamically or understand why the port is 19999.

If I launch my app normally (rails s -p 3000), the port doesn't change to 19999.

도움이 되었습니까?

해결책

You can setup callback url's host with OmniAuth.config.full_host like:

OmniAuth.config.full_host = "http://yourapp.dev"

This must be placed before omniauth is called. I think config/initializes/omniauth.rb is good.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top