Omniauth icon adds an additional port in auth url

I use omniauth-facebook, omniauth-twitter, omniauth-google-oauth2gems
to log in, everything works fine on localhost, but in production it adds a port number of 5050 to the authorization URL, has anyone encountered this problem? My website url is addthis.com

Twitter URL

http://addthis.com:5050/users/auth/twitter/callback?oauth_token=krnYyA5BzM4JlCc5XVxuhsdfspArsdfgtkrUzajMts&oauth_verifier=MjLR9fPSV7aWThOe80oDuvBdbpbpfjfbpfjpj

Facebook url:

https://www.facebook.com/dialog/oauth?client_id=213027215529249&redirect_uri=http%3A%2F%2Faddthis.com%3A5050%2Fusers%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=9ffbfdfbfdfbfdfbffdffdfefffefefeffeffeffeffibeffisffisffbeffibfefbisffbfad and any other

Google url

Redirect URI in the request: http://addthis.com:5050/users/auth/google_oauth2/callback does not match the registered redirect URI

+4
source share
1 answer

Omniauth in response included the port used inside nginx
this blog helped me a lot http://awesomeprogrammer.com/blog/2012/12/09/dealing-with-omniauth-redirect-uri-mismatch-invalid-port-number-gotcha/

+3
source

Source: https://habr.com/ru/post/1527934/


All Articles