New OmniAuth strategy gem released for Rails

62 views
Skip to first unread message

tapster

unread,
Dec 26, 2011, 8:29:03 PM12/26/11
to Meetup API
just a quick note to say I wanted to use the OAuth 2 consumers with
OmniAuth 1.0, but since there wasn't an existing strategy gem, I wrote
and open sourced one here https://github.com/tapster/omniauth-meetup

Doug Tangren

unread,
Dec 27, 2011, 9:46:36 AM12/27/11
to meetu...@googlegroups.com
Awesome! Thanks for sharing.

You can probably even make this simpler. Instead of using the v1 members method to get the current member info,

https://github.com/tapster/omniauth-meetup/blob/master/lib/omniauth/strategies/meetup.rb#L33

You can use the v2 /2/member/self method which will just give you the member you are looking for

http://www.meetup.com/meetup_api/console/?path=/2/member/:id&:id=self

Consider posting a library submission here

http://www.meetup.com/Meetup-API-Testing/pages/API_Client_Libraries_Submissions/

and it will get listed here

http://www.meetup.com/meetup_api/clients/

Doug Tangren
Meetup
API Team

tapster

unread,
Dec 27, 2011, 11:20:07 AM12/27/11
to Meetup API
thanks for the feedback Doug. I updated to use the v2 style API call
and versioned the gem.

also posted to the API Client Submission page

cheers

miles


On Dec 27, 11:46 pm, Doug Tangren <d...@meetup.com> wrote:
> On Mon, Dec 26, 2011 at 8:29 PM, tapster <mi...@thespecials.com> wrote:
> > just a quick note to say I wanted to use the OAuth 2 consumers with
> > OmniAuth 1.0, but since there wasn't an existing strategy gem, I wrote
> > and open sourced one herehttps://github.com/tapster/omniauth-meetup
>
> Awesome! Thanks for sharing.
>
> You can probably even make this simpler. Instead of using the v1 members
> method to get the current member info,
>
> https://github.com/tapster/omniauth-meetup/blob/master/lib/omniauth/s...
>
> You can use the v2 /2/member/self method which will just give you the
> member you are looking for
>
> http://www.meetup.com/meetup_api/console/?path=/2/member/:id&:id=self
>
> Consider posting a library submission here
>
> http://www.meetup.com/Meetup-API-Testing/pages/API_Client_Libraries_S...
>
> and it will get listed here
>
> http://www.meetup.com/meetup_api/clients/
>
> Doug Tangren
> Meetup <http://meetup.com/>
> API Team

Long

unread,
Sep 28, 2013, 4:31:36 PM9/28/13
to meetu...@googlegroups.com
Hello,

I am following instructions to authenticate a user and was expecting to get an Authentication Hash in the callback URL but it doesn't seem to be there.

My configuration is Ruby 2.0, Rails 4.0 with both omniauth and omniauth-meetup gems.

The user authenticates on Meetup.com with this url:

https://secure.meetup.com/oauth2/authorize?client_id=MEETUP_KEY&response_type=code&redirect_uri=http://localhost:3000/auth/meetup/callback

The callback method is:

  # GET /auth/:provider/callback
  def create
    user = User.find_or_create_from_auth_hash(request.env['omniauth.auth'])
    redirect_to '/'
  end

User is able to authenticate and gets redirected. However, request.env['omniauth.auth'] is nil (not there) when I inspect the request headers.

Does anyone have any idea what I may be missing?

Thanks,
Long

Long

unread,
Oct 4, 2013, 10:58:16 PM10/4/13
to meetu...@googlegroups.com
Update:

I figured out the issues and want to document them here for reference.

1. I should be using /auth/meetup to kick start the login process
2. Devise was not configure so it was blocking activation of /auth/meetup

Cheers
Reply all
Reply to author
Forward
0 new messages