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

**URL:** <https://meta.discourse.org/t/invalid-omniauth-callback-does-not-support-post-only-get/43741>\
**Category:** Bug\
**Created:** [5. Mai 2016 um 15:34 UTC](https://meta.discourse.org/t/invalid-omniauth-callback-does-not-support-post-only-get/43741 "2016-05-05T15:34:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarek/32/124831_2.png) [@tarek](https://meta.discourse.org/u/tarek)\
**Post date:** [5. Mai 2016 um 16:38 UTC](https://meta.discourse.org/t/invalid-omniauth-callback-does-not-support-post-only-get/43741/2 "2016-05-05T16:38:17Z")

</div>

It appears this is the offending line, which would make it a problem of [OAuth2 Basic](https://meta.discourse.org/t/oauth2-basic-support/) and not callback in general.

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

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

```

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

```plaintext
[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 : )

---

_[View the full topic](https://meta.discourse.org/t/invalid-omniauth-callback-does-not-support-post-only-get/43741)._
