0
votes

I need some clarification with Omniauth for facebook and twitter. I m using Devise to authenticate users. I followed http://railscasts.com/episodes/236-omniauth-part-2 and http://railscasts.com/episodes/235-omniauth-part-1 to implement Omniauth with devise. Now i can successfully sign up a new user with omniauth facebook with email. My doubt is how will be the user may sign in after registration? For me now it is showing 'Invalid email or password.' How should i handle this situation?

Thanks.

1

1 Answers

0
votes

A user who signed up with facebook or twitter will only be able to sign in with the service(s) they linked to their account. Obviously, they won't be able to sign in with the regular email/password combo. Except if you allow them to edit their profile and give them the option to enter a password for their account.

On your sign up/sign in page, just display all the services you support, the user will choose the one he connected his account to when signing up.

So basically, if I signed up with facebook on your site, following /auth/facebook would log me in.