Closed robbiehudson closed 8 years ago
@robbiehudson could you show your configuration?
@doomspork sure, here you go:
config :ueberauth, Ueberauth,
providers: [
google: {Ueberauth.Strategy.Google, []}
]
config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: System.get_env("GOOGLE_CLIENT_ID"),
client_secret: System.get_env("GOOGLE_CLIENT_SECRET")
I think that's all you need?
@robbiehudson: What version of OAuth2 are you running?
I had the same issue as you did when I upgraded OAuth2 version 0.7 (which is the latest version of OAuth2 on hex). This issue seems to be caused by some breaking changes in OAuth 0.7 (as seen in the changelog)
However, the issue went away once I downgraded back to OAuth 0.5.
Hopefully that helps.
Thanks!
That fixed it and I can now get an access token fine. Perhaps updating the docs / installation instructions would be a good idea?
On Fri, Aug 19, 2016 at 8:23 AM, Cheng-Han Lee notifications@github.com wrote:
@robbiehudson https://github.com/robbiehudson: What version of OAuth2 are you running? I had the same issue as you did when I was running OAuth2 version 0.7 (which is the latest version of OAuth2 on hex).
However, the issue went away once I downgraded back to OAuth 0.5.
Hopefully that helps.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ueberauth/ueberauth_google/issues/18#issuecomment-240947135, or mute the thread https://github.com/notifications/unsubscribe-auth/AAISp3WBigIZR9g9Tpi1ahFGAZd8utf2ks5qhVnngaJpZM4Jmkpl .
Rob Hudson +44 7834 405 449 Linkedin: http://www.linkedin.com/in/rjchudson Twitter: https://twitter.com/robbiehudson Skype: rjchudson
@chenghanlee 👍 Thanks a lot for that i spent hours on that. You saved me.
Sorry about this! It appears a non-backwards compatible version of OAuth2 was released that broke Ueberauth but has since been resolved.
Not sure locking to OAuth 0.6.0 is an issue resolved though. For some reason I end up with OAuth 0.7.0, even though Ueberauth locks to 0.6.0. It's all broken now :( Handling the new version wouldn't be better?
@EHadoux I was having the same issue, and realized that the ueberauth current release is 0.3.0, which doesn't include the oauth lock fix mentioned here.. This is how I fixed it:
Check what version of ueberauth_google and oauth you are using:
$ mix deps
Unlock and clean if you have v0.3.0
or earlier:
$ mix deps.unlock ueberauth_google
$ mix deps.clean ueberauth_google
Go to your project's mix.exs
, and set the dependency to github directly:
{:ueberauth_google, github: "ueberauth/ueberauth_google"}
Finally, get the deps:
$ mix deps.get
Check to make sure:
$ mix deps # shows that oauth is locked at 0.6.0
Okay, thanks. Another solution is to just lock oauth at 0.6.0 and it works. But hopefully it's just temporary. I mean, the fix it's just locking oauth version therefore I'd rather lock it on my own side and keep the hex version of ueberauth-google.
I'm getting the following exception / issue when the call to get an access token is made (id and secret removed by me):
Not sure what's going on. I've looked around in the source code and it looks like the client_secret is being sent. I am new to Elixir!