Before I begin experimenting with code, I thought I'd post this here so I can see if anyone else has already written a sample: I'm developing a web application with standard ASP.NET membership providers (specifically using the SqlTableProfileProvider). I want to add buttons for 'Sign in with Twitter' and 'Sign in with Facebook Connect'. My challenge is to treat these people as authenticated users with profile data once they have connected using oAuth.
I'm thinking it might possibly take this route:
- User the Twitterizer framework to authenticate with Twitter via oAuth
- Retrieve the user's Twitter username
- User the membership provider's "CreateUser" function to create a user in the database with the same username as the Twitter handle, and with a randomly generated password (or alternatively leave the password field blank, but I assume it requires at least something for password)
- Log in the user through code, then get them to fill out their profile data.
- Then when they return, log-in the user (through code) if a successful connection to Twitter is made.
Would anyone agree this is the best path to take?
View Complete Post