Skip to content

Commit

Permalink
added support for form authenticity tokens (thanks to brianjlandau)
Browse files Browse the repository at this point in the history
  • Loading branch information
activefx committed Sep 14, 2008
1 parent 8c6c791 commit df3411f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/open_id_authentication.rb
Expand Up @@ -152,6 +152,12 @@ def open_id_redirect_url(open_id_request, fields, return_to = nil, method = nil)
open_id_request.return_to_args['open_id_complete'] = '1'
open_id_request.return_to_args['remember_me'] = fields[:remember_me].to_s if fields[:remember_me]
open_id_request.return_to_args['invitation_token'] = fields[:invitation_token].to_s if fields[:invitation_token]
if (method || request.method).to_s != 'get'
begin
open_id_request.return_to_args[request_forgery_protection_token.to_s] = form_authenticity_token
rescue InvalidAuthenticityToken
end
end
open_id_request.redirect_url(root_url, return_to || requested_url)
end

Expand Down

0 comments on commit df3411f

Please sign in to comment.