Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OmniAuth & openid: getting certain fields from openid provider

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

like image 508
cbrulak Avatar asked Oct 17 '10 03:10

cbrulak


Video Answer


1 Answers

Are you asking how to request for that data, or how to ensure you get it? You can request for data using the OpenID AX attributes, but an OpenID provider isn't obliged to respond to what you request for. This should be of some help though:

Retrieve OpenID AX attributes from Google / Yahoo in Rails

It seems like Google will respond with an email only to

http://schema.openid.net/contact/email

whereas Yahoo will reply to

http://axschema.org/contact/email
like image 65
Vanwaril Avatar answered Oct 23 '22 14:10

Vanwaril