Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

authentication errors do not call defined failure root #17

Open
andrew-whitmore opened this issue Nov 25, 2015 · 1 comment
Open

authentication errors do not call defined failure root #17

andrew-whitmore opened this issue Nov 25, 2015 · 1 comment

Comments

@andrew-whitmore
Copy link

lib/omniauth/strategies/azure_activedirectory.rb:88 always raises errors regardless of the environment that the application is in.

The omniauth implementation suggests that any environment apart from development will push errors to the defined /auth/failure path

@ckritzinger
Copy link

You can monkey-patch this into submission with:

  # monkey-patch
  module OmniAuth
    module Strategies
      class AzureActiveDirectory
        def callback_phase
          error = request.params['error_reason'] || request.params['error']
          if error
              return self.fail!(error)
          end
          @session_state = request.params['session_state']
          @id_token = request.params['id_token']
          @code = request.params['code']
          @claims, @header = validate_and_parse_id_token(@id_token)
          validate_chash(@code, @claims, @header)
          super
        end

That will cause it to behave like the OmniAuth docs claims it should.

daveclay added a commit to napazone/omniauth-azure-activedirectory that referenced this issue Mar 22, 2018
The omniauth library provides a fail! method to hook a failure in a
plugin, which the azure plugin isn't using.

AzureAD#17
daveclay added a commit to napazone/omniauth-azure-activedirectory that referenced this issue Mar 26, 2018
The omniauth library provides a fail! method to hook a failure in a
plugin, which the azure plugin isn't using.

AzureAD#17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants