I have implemented twitter authentication with devise using something very similar to this: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
My question is, since twitter doesn't give you the email of the user, how can you direct the user back to the flow of:
Devise pretty much takes care with #3 and #4. How should I structure my code to allow #2 to transit into #3 and #4?
Thanks!
Complete: Your account must have a profile name, and a profile image; Active use: Your account must be public at the time of application and you must have logged into that account in the last six months; Security: Your account must have a confirmed email address or phone number; and.
When you add or change the email address attached to your account, we'll send you an email asking you to confirm the change. In the email we send, clicking the Confirm now button lets us know the email address is yours.
I didn't receive the SMS code If you're logged in, verify that your phone is turned on correctly in your Mobile settings. If you recently changed your phone number or mobile carrier, you will need to update your settings. You may do so through the web, iOS, or Android apps if you are still logged in.
Show new user form in twitter callback page. Store twitter token in hidden field. Then you can create new user in your controller and do what you want with the twitter token. User.create also sends confirmation email.
User.create(:email => params[:email], :password => params[:password], :password_confirmation => params[:password_confirmation])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With