Show new user form on twitter callback page. Store the tweeter token in a hidden field. Then you can create a new user in your controller and do what you want with the twitter token. User.create also sends a confirmation email.
User.create(:email => params[:email], :password => params[:password], :password_confirmation => params[:password_confirmation])
emrahbasman
source share