[Invalid] Omniauth callback does not support POST, only GET

Hello all,

I am trying to implement OAuth2 Basic with @dashohoxha’s Drupal plugin oauth2_loginprovider.

I get an error during the callback:

As @dashohoxha noted, it appears that the error is related to GET instead of POST:

As I looked, there appears to be no way to change this behaviour via plugin. Any ideas?

tarek : )

It appears this is the offending line, which would make it a problem of OAuth2 Basic and not callback in general.

From discourse-oauth2-basic/plugin.rb:53:in 'fetch_user_details':

user_json = JSON.parse(open(user_json_url, 'Authorization' => "Bearer #{token}" ).read)

From trying to debug this on IRC, it appears that:

[12:31:56] <jmarinelli> open-uri only supports GET
[12:32:42] <jmarinelli> look into HTTParty, or Net::HTTP if you don't want to add dependencies
[12:32:55] <havenwood> You could use Net::HTTP from the stdlib but it's a bit unwieldy. I'd suggest HTTP.rb for a gem: https://github.com/httprb/http#readme

I will post this all to the OAuth2 Basic site. How do I close this topic?

tarek : )