Permalink
Browse files

fix invalid authenticity token error. borrowed from http://github.com…

  • Loading branch information...
herestomwiththeweather committed Sep 2, 2008
1 parent b7ca868 commit 233c233faee8ec6d2cf8e7f63076014e1bb3e7db
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/open_id_authentication.rb
@@ -150,6 +150,9 @@ def add_simple_registration_fields(open_id_request, fields)
def open_id_redirect_url(open_id_request, return_to = nil, method = nil)
open_id_request.return_to_args['_method'] = (method || request.method).to_s
open_id_request.return_to_args['open_id_complete'] = '1'
+ if(method || request.method).to_s != 'get'
+ open_id_request.return_to_args[request_forgery_protection_token.to_s] = form_authenticity_token
+ end
open_id_request.redirect_url(root_url, return_to || requested_url)
end

0 comments on commit 233c233

Please sign in to comment.