AlexanderZaytsev / domp

Devise & Omniauth Multiple Providers
MIT License
106 stars 15 forks source link

twitter email issue #11

Open robsilva opened 10 years ago

robsilva commented 10 years ago

After authenticating with Twitter, the user is not able to sign in because "email can't be blank". As far as I can tell twitter won't share their user's email with my app. How do you usually handle that? Awesome job on this gem, by the way!

arjanfrans commented 10 years ago

That is the downside of using Twitter as an authentication provider.

Instead of directly creating the user, redirect to the registration form where they can fill in their e-mail. Information you got from Twitter, like their name, can be filled in already for them.

You can save the information you got from Twitter in a session variable. After they registered with the registration form the account will be linked (using the information that is stored in the session variable). This is what I did on some other projects (non Rails).