redirect_uri for Oauth2 (google) and reverse proxy
1,030 views
Skip to first unread message
Christophe
unread,
Feb 20, 2014, 12:13:42 PM2/20/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to secure...@googlegroups.com
Hi,
I have a play application set-up behind a reverse proxy. https://myappurl is proxy-passed to localhost:9xxx where the app server is running. I am currently implementing Google login with SecureSocial and it does not work when testing behind the reverse proxy.
1) I go to https://myappurl and login 2) I am correctly redirected to google 3) when logging in, Google redirects me to http://localhost:9xxx which obviously does not work
This is because the Oauth request is done with &redirect_uri=http%3A%2F%2Flocalhost%3A9xxx%2Fauthenticate%2Fgoogle
I did not manage to configure SecureSocial to actually redirect to the proxy-passed URI.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to secure...@googlegroups.com
Hi Jorge,
Thank you for your fast answer. It pointed me into the right direction, the headers were correctly setup in the proxy (nginx here) but I had an "upstream" directive in the vhost configuration which was apparently modifying something in the request. I removed the upstream configuration as I don't need it and put directly 127.0.0.1 in the proxy_pass directive and now it works perfectly.
Thank you again ! Christophe
Jorge Aliss
unread,
Feb 21, 2014, 7:58:30 AM2/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message