devise_facebook_connectable icon indicating copy to clipboard operation
devise_facebook_connectable copied to clipboard

facebook_link and normal authentication

Open bitzesty opened this issue 16 years ago • 2 comments

can facebook_link detect the presence of fb session on a user, and then just display the standard logout link, if the user did not sign in with facebook?

bitzesty avatar Dec 15 '09 13:12 bitzesty

Right, I guess so - have to look into the scenarios first. You could hackit yourself I guess for now.

grimen avatar Dec 15 '09 15:12 grimen

You can just detect whether @facebook_session exists, for example:

    <% if @facebook_session %>
      <%= facebook_sign_out_link :for => :user %>
    <% else %>
      <%= link_to 'Sign out', destroy_user_session_path %>            
    <% end %>

sssionggg avatar Feb 03 '10 07:02 sssionggg