I'd like to allow users the option to register using their Twitter account. Basically, I'll present them with a standard signup form (name, login, email, pwd, pwd_confirm) as well as a "Signup with Twitter" link.
If a user chooses to signup with Twitter creds, then I'll create a user record in db. Then I'd like to be able to allow a user to au开发者_开发问答thenticate using their Twitter creds on returning visits. Also, I'm using restful_authentication, so I need to have this work within that context.
What is the best way to do this? I haven't been to find any tutorials on allowing the signup and authentication pieces. Most examples just show how to authenticate a Twitter user into your app.
Thanks.
You need to link the user's account in your app with their twitter account. You won't be storing their twitter credentials directly (if you are, you're doing it wrong.)
While it's for facebook instead of twitter, this example demonstrates the technique of how to do this sort of integration, and it even uses restful_authentication.
精彩评论