Needs review
Project:
OAuth Connector
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Aug 2012 at 09:11 UTC
Updated:
5 Oct 2014 at 00:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
patcon commentedNot sure whether more presets are useful or best kept in another module, but here it is, just in case. Only been testing locally, so haven't done the final bit of testing to prove that it completely works :)
https://github.com/patcon/oauthconnector_github
Comment #2
patcon commentedStill toying around with this. Was getting an issue on my local VM, so just recently got around to trying on a Rackspace server, thinking oauth didn't work locally. Found the same error happening, and so dug in to discover that local development shouldn't make a difference.
I'll work on packaging up my setup to work with the Ariadne vagrant development VM, so that anyone interested in GitHub testing can reproduce the error with very little effort :)
That krumo output above is for
dpm($options)from right beforecurl_init()inget()Comment #3
patcon commentedOh, and here's an install profile sans the client and secret keys:
https://github.com/patcon/drupalgithub
Comment #4
jon pughI was getting the same thing, thankfully I found your github module and realized its not just my problem...
Trying to solve this. After hours of staring at the request it still looks right to me...
Found this description of HTTP 406 code that might help:
https://github.com/WhiteHouse/api-standards/issues/12
Comment #5
jon pughWell, I'll be. A fresh night's sleep does wonders.
the current code in DrupalOAuth2Client.inc uses x-www-form-urlencoded
I changed it to 'application/json' and voila! It works!
Now... I guess we need to patch oauthconnector?
Comment #6
Anonymous (not verified) commentedThank you for that fix very much :)
Comment #7
jsacksick commentedHere's the patch that adds the preset, I haven't touched the $headers array.
Comment #8
patcon commentedDitto what @alex_bytsiuk said :) Thanks @jonpugh!
Comment #9
Anonymous (not verified) commented@jsacksick but your patch don't solve the problem. Did you try to fix the bug or just add GitHub as preset provider?
Comment #10
patcon commentedalex_bytsiuk++
Appreciate the patchifying @jsacksick, but I wasn't looking to get a github preset into core, since that's why the module is extensible
Comment #11
patcon commentedMeh. I know it's not the right approach to get accepted into the module, but here's the patch for @jonpugh's hack :)
Comment #12
dxxPatch "resolve" issue for me. Using "application/json" does not break others providers (tested with Google, Twitter, Facebook, Linkedin and GitHub).
For get the email field from GitHub profil you need to use "user" in scope and "https://api.github.com/user/emails" at ressource but it's not possible to map a array field, one solution? It's possible with QueryPath?
Found! (no QueryPath required) simply use: "0.email".