Index: app/controllers/account_controller.rb
===================================================================
--- app/controllers/account_controller.rb	(révision 8717)
+++ app/controllers/account_controller.rb	(copie de travail)
@@ -21,6 +21,8 @@
   
   # prevents login action to be filtered by check_if_login_required application scope filter
   skip_before_filter :check_if_login_required
+  # prevents login action to be checked for tokens, as we don't send it to openid
+  skip_before_filter :verify_authenticity_token
 
   # Login request and validation
   def login
@@ -194,6 +196,9 @@
             account_pending
           end
         end
+      else
+        logger.warn "OpenID authentication failed for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
+        flash.now[:error] = "OpenID login failed with '#{result.message}' '#{registration}"
       end
     end
   end
Index: vendor/plugins/open_id_authentication/lib/open_id_authentication.rb
===================================================================
--- vendor/plugins/open_id_authentication/lib/open_id_authentication.rb	(révision 8717)
+++ vendor/plugins/open_id_authentication/lib/open_id_authentication.rb	(copie de travail)
@@ -172,7 +172,7 @@
       when OpenID::Consumer::CANCEL
         yield Result[:canceled], identity_url, nil
       when OpenID::Consumer::FAILURE
-        yield Result[:failed], identity_url, nil
+        yield Result[:failed], identity_url, open_id_response.message
       when OpenID::Consumer::SETUP_NEEDED
         yield Result[:setup_needed], open_id_response.setup_url, nil
       end
