HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Enabling Oauth2 SSO against GitHub
djipco
New
[I am posting here because I cannot find Oauth2 SSO in the plugins.]
Greetings!
I'm trying to allow my users to login with their GitHub account. To that end, I'm using the Oauth2 SSO plugin (inside Vanilla Forums 3.3). The process seems to be working but, at the very end, I get the following error:
Whoops! The OAuth server did not return an access token.
I don't know what I'm doing wrong. Can anyone point me in the right direction?
Here are my settings:
Thank you so much for your help!
0
Comments
Sorry, it seems this has erroneously been flagged as spam.
You are getting this generic error, because GitHub did not answer with a valid token or an actual error.
https://github.com/vanilla/vanilla/blob/cb6f17dac13d0437ceaf19f3c91f70f68c143e5d/library/core/class.oauth2.php#L700
It looks like GitHub sends the token as text if there is no Accept:application/json header:
I would start debugging by changing this line:
https://github.com/vanilla/vanilla/blob/cb6f17dac13d0437ceaf19f3c91f70f68c143e5d/library/core/class.oauth2.php#L628
... to this:
$headers = ['Accept' => 'application/json'];
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS