1

I'm using the omniauth gem so people can log in to my site with their google accounts. I have it working with facebook and twitter but I for google accounts I can't extract the UID properly on the callback.

For Facebook & Twitter I can use:

@user.uid = auth["uid"]

But this gives me:

https://www.google.com/accounts/o8/id?id=gXtgsdgirhGugasuzdg-asdhuzigaoWV1kgo

When I try to use a google account. I also can't work out how to get a photo.

Thanks! Alex

fx_
  • 1,932
  • 13
  • 17
Alex Fox
  • 1,175
  • 2
  • 15
  • 27

1 Answers1

4

What it gives you is in fact the UID for your user. It is his unique OpenID URL that he is identified by.

Twitter and Facebook use OAuth, Google uses OpenID. If you want the user's e-mail address, it will be in auth["user_info"]["email"].

fx_
  • 1,932
  • 13
  • 17