ueberauth / ueberauth_google

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

callback_scheme option override doesn't seem to work #89

Closed shulhi closed 2 years ago

shulhi commented 2 years ago

I'm having issue with Error 400: redirect_uri_mismatch

The url is properly set in Google Dev Console, however uberauth seems to request the url with HTTP instead of HTTPS. Reading the source leads me to this comment where I can specify an option to override the callback scheme.

https://github.com/ueberauth/ueberauth/blob/7ebc0aeeb17d0953bdc53a01018307fb03e0b189/lib/ueberauth.ex#L182-L186

config :ueberauth, Ueberauth,
  providers: [
    google:
      {Ueberauth.Strategy.Google, [default_scope: "email profile", callback_scheme: "https"]}
  ]

However the callback was still sent with HTTP. I'm using Cloudflare as https reverse proxy.

shulhi commented 2 years ago

Upon checking that this has already implemented in 0.8