ueberauth / ueberauth_google

Google OAuth2 Strategy for Überauth.
MIT License
166 stars 85 forks source link

HTTPS Not Working Behind Proxy #17

Closed nikkomiu closed 7 years ago

nikkomiu commented 8 years ago

Using NGINX to do SSL offloading there doesn't seem to be a way to make the OAuth request with a callback URI that uses HTTPS instead of HTTP.

Is there any way to make it possible to either manually specify HTTPS or a Callback URI?

doomspork commented 8 years ago

Hi @nikkomiu, you can configure the callback_path: https://github.com/ueberauth/ueberauth#customizing-paths

nikkomiu commented 8 years ago

That doesn't seem to work with a URL it only seems to work with a path.

doomspork commented 8 years ago

@nikkomiu sounds like something that might be worth incorporating into Ueberauth, would you be interested in opening a PR to add this?

nikkomiu commented 8 years ago

I can take a look at it! Should I put an issue in on Ueberauth?

doomspork commented 8 years ago

Please do!

nikkomiu commented 8 years ago

Of course in looking through the source code there is a better way to handle my particular use case. :disappointed:

I can set the X-Forwarded-Proto header from my NGINX instance to set https properly.

Perhaps the only thing needed is documentation around this header?

hassox commented 7 years ago

Sounds like a plan. @nikkomiu would you be up for a PR?

nikkomiu commented 7 years ago

Yea I could do that. Should this go on Uberauth though and not the Google specific one?

nikkomiu commented 7 years ago

The solution to my problem was with the NGINX configuration. I needed to add the X-Forwarded-Proto header in my NGINX configuration for the site.