Skip to content

Commit

Permalink
Closes omniauth#55 - On Failure now conforms to Rack spec, sets omnia…
Browse files Browse the repository at this point in the history
…uth.error.type and omniauth.error.strategy
  • Loading branch information
Michael Bleigh committed Nov 29, 2010
1 parent 8c6a06b commit e05300b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion oa-core/lib/omniauth/strategy.rb
Expand Up @@ -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.