ueberauth / ueberauth_google

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

Redirect_URI not resolving correctly #97

Open mastari opened 1 year ago

mastari commented 1 year ago

Steps to Reproduce

  1. Change redirect_uri parameter to some value in config: config :ueberauth, Ueberauth.Strategy.Google.OAuth, redirect_uri: 'https://example.com'

  2. Check network logs

Expected Result

Expected redirect_uri to be https://example.com

Actual Result

Got redirect_uri to be http://example.com

My Suspicion

My endpoint uses HTTP and I get HTTPS throught NGINX. I think the uri is resolving to the endpoint HTTP status instead of explicitly using the string I provided it.

yordis commented 1 year ago

Can you replicate this by adding a new unit test to the package? I'm here to help you with it.

You could start by copy-pasting one test case from https://github.com/ueberauth/ueberauth_google/blob/master/test/strategy/google_test.exs

paulswartz commented 9 months ago

Is Plug.SSL being called in the pipeline with Ueberauth in it? That uses the x-forwarded-for header to set the correct scheme.