Skip to content

Instantly share code, notes, and snippets.

@kineticac
Created March 9, 2011 09:25
Show Gist options
  • Select an option

  • Save kineticac/861933 to your computer and use it in GitHub Desktop.

Select an option

Save kineticac/861933 to your computer and use it in GitHub Desktop.
Ryan Bates' AuthenticationsController
# these lines of code does not take into account a facebook token if the user is already connected
elsif current_user
current_user.authentications.create!(:provider => omniauth['provider'], :uid => omniauth['uid'])
flash[:notice] = "Authentication successful."
redirect_to authentications_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment