views:

222

answers:

1

I have an application that will accept both Facebook and Yahoo registrations as well as normal registration (providing username, email, password).

I'm confused on the Facebook and Yahoo side of the registration. The scenario is, upon clicking the Facebook/Yahoo registration links, users will be redirected to the provider's site for login, then redirect to our site with a form pre-filled with their email address and other profile data (photo/profile pic, birthday, gender, address, etc). With OpenId, as far as I know, you can't have access to most of those information since its concern is authentication. So, on the signup part, I'm thinking of using OAuth.

However, I saw on Yahoo's registration for an API key (http://developer.yahoo.com/oauth/ or http://developer.yahoo.com/dashboard/createKey.html) that you can't access the user's email under Yahoo! Profiles. I need that email address to save on my accounts database.

Then, on sign in, I plan to use OpenID both for Facebook and Yahoo. Is that ok? Using OAuth for sign-up, and OpenID for login/sign-in? Or can I use OAuth for signing in? (I know you can do this on Facebook with their Javascript SDK, but I am not aware about Yahoo's).

A: 

Yahoo supports OpenID, which is the appropriate method for signing in on Yahoo. For Facebook, you can do it yourself (http://developers.facebook.com/docs/authentication/) or use the JS SDK, which makes it as simple as having to read a signed cookie (make sure to validate the signature). JS examples for auth can be found here: http://fbrell.com/auth/all-in-one

daaku