Skip to content

Commit

Permalink
fixed cookie deletion for case where a domain is specified in fb conn…
Browse files Browse the repository at this point in the history
…ect settings
  • Loading branch information
kevin lochner committed Jan 6, 2009
1 parent f16988c commit 4d591fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/facebooker/rails/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ def valid_session_key_in_session?
end

def clear_fb_cookies!
fb_cookie_names.each {|name| cookies.delete name}
domain_cookie_tag = "base_domain_#{Facebooker.api_key}"
cookie_domain = ".#{cookies[domain_cookie_tag]}" if cookies[domain_cookie_tag]
fb_cookie_names.each {|name| cookies.delete(name, :domain=>cookie_domain)}
cookies.delete Facebooker.api_key
end

def fb_cookie_prefix
Facebooker.api_key+"_"
end
Expand Down

0 comments on commit 4d591fa

Please sign in to comment.