views:

53

answers:

1

I'm using the rails gem: OmniAuth to login users.

When using an OpenId provider I would like to get certain field, like email and nickname but I don't see any documentation on this.

Any ideas?

thanks

A: 

request.env['omniauth.auth'] should have what you need. For Twitter it returns something like

{
  'uid' => '12356',
  'provider' => 'twitter',
  'user_info' => {
    'name' => 'User Name',
    'nickname' => 'username',
    # ...
  }
}

Just inspect it for openid.

Sean McCann