Permalink
Browse files

Closes #55 - On Failure now conforms to Rack spec, sets omniauth.erro…

…r.type and omniauth.error.strategy
  • Loading branch information...
1 parent 8c6a06b commit e05300b5f21067a59874886918700598324ac786 Michael Bleigh committed Nov 29, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 oa-core/lib/omniauth/strategy.rb
@@ -103,7 +103,10 @@ def user_info; {} end
def fail!(message_key, exception = nil)
self.env['omniauth.error'] = exception
- OmniAuth.config.on_failure.call(self.env, message_key.to_sym)
+ self.env['omniauth.error.type'] = message_key.to_sym
+ self.env['omniauth.error.strategy'] = self
+
+ OmniAuth.config.on_failure.call(self.env)
end
end
end

0 comments on commit e05300b

Please sign in to comment.