Reputation: 10651
Im using rails 3 with devise and omniauth-facebook, I click on the "Login with facebook link", it redirects me to facebook page of my app, I login with my facebook credentials, it redirects me back to my Rails app successfully, and it also added my facebook email to the users table, but how do I access the logged in users details?
I tried using the devise user model, but no luck
here is what i have
<%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %>
<% if user_signed_in? %>
<div>Signed in as... <%= current_user.email %></div>
<% else %>
not signed in
<% end %>
Any help would be appreciated, thanks guys! :D
Upvotes: 0
Views: 473
Reputation: 1513
I think here you can find what you're looking for, read and watch the article carefully :) http://railscasts.com/episodes/236-omniauth-part-2
Upvotes: 2