RailsCasts Pro episodes are now free!

Learn more or hide this

develup's Profile

GitHub User: develup

Site: www.develup.nl

Comments by


I wanted to use multiple providers for 1 account, so I can sign in to the same account using Facebook or LinkedIn.
When e-mails from providers match, I add them to the existing user.

I changed:

user = User.new


user = User.find_or_create_by_email(omniauth['info']['email'])

Without this change, I was redirected to the new signup form while adding a second provider. And because my e-mail was already in use, there was no way to add both Facebook and LinkedIn