Roman Matveev
Roman Matveev

Reputation: 577

What is the best and easiest way to grant access to my site (OAuth, OpenID...)

I'd like to grant access to my site via Facebook, Twitter and so on. I will definitely need the user's email and hopefully his avatar image. I see the following algorithm:

  1. User clicking on "access via Facebook (or anything)" button
  2. Browser shows a pop-up with Facebook (or anything) login and password inputs
  3. User types in his login/password pair and clicks "Sign-In" button
  4. Something (it is not clear for me how) calls my script like mysite.com/login.php?token=token_it_self&[email protected]&avatar=http://facebook.com/images/12345.jpg

Probably there are any tools to make this routine clean and easy providing most common social networks (Facebook, Twitter, LinkedIn...)? Of course free tools will be much more appreciated.

Upvotes: 0

Views: 75

Answers (1)

Brian
Brian

Reputation: 727

I found that OpAuth [ https://github.com/opauth/opauth ] was fairly easy to implement.

I should say though, Twitter will not expose you to the users email address which makes it almost useless when using a combination of other providers for a single sign on. You could of course have them manually verify everything in order to link other provider accounts to their twitter account, but then doesn't that defeat the purpose of single signon? Unless you, as a developer, and your users are willing to take extra steps, I would not suggest using Twitter as a sign on provider.

Upvotes: 1

Related Questions