Closed deanpcmad closed 4 years ago
So just by changing the raw_info
fix you made locally, i'm receiving the following error:
{"error":"Unauthorized","status":401,"message":"OAuth token is missing"}
Its very likely something wrong with the version of omniauth-oauth2
i'm using but i'll gladly try this pr in its entirety to see if its a dependency issue.
Yeah, possibly. I thought it would be best to update the omniauth-oauth2
gem anyway as this gem hasn't been updated in a while!
I've just deployed this gem on my production app and login now works so I'm happy!
Yep!
Looks like a dependency conflict with another package using an older version of omniauth-oauth2
that unfortunately I cannot resolve at this time.
My current conflict holds me back to omniauth-oauth2
1.3.1, so if anyone is locked to an older version they may have breaking changes here to contend with in other packages. In the newest version of my conflicting package, it has an upgrade to 1.4.
If anyone else is unable to upgrade due to a conflict (mine is very spooky to update), what i did to resolve the issue was generate my own faraday request:
def get_raw_info
url = "https://api.twitch.tv/helix/users"
con = Faraday.new
res = con.get do |req|
req.url url
req.headers['Client-ID'] = "#{access_token.client.id}"
req.headers['Authorization'] = "Bearer #{access_token.token}"
end
body = JSON.parse(res.body)
body["data"][0]
end
With that said, I'd recommend also adding a minor version bump to this PR as it will definitely break some peoples implementations. (if the maintainer has no objections)
This really needs to get merged and deployed out ASAP. Today was the final cutoff.
This has been released
Great, thanks!
Fixes #17