Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure authorization_server_path - i.e. JWT iss #22

Open
tegon opened this issue Jan 3, 2022 · 2 comments
Open

Allow to configure authorization_server_path - i.e. JWT iss #22

tegon opened this issue Jan 3, 2022 · 2 comments

Comments

@tegon
Copy link

tegon commented Jan 3, 2022

Context

The omniauth-okta Gem assumes an authorization server is being used, so it appends /oauth2/default to the token issuer.

https://github.com/omniauth/omniauth-okta/blob/master/lib/omniauth/strategies/okta.rb#L89

This causes an Invalid issuer error when authorizing with our organization's Okta account. Since we don't use an authorization server, we need to only use the site as the issuer. We are getting around this issue with the following patch:

module OmniAuth
  module Strategies
    class Okta < OmniAuth::Strategies::OAuth2
      def authorization_server_path
        client_options.fetch(:site)
      end
    end
  end
end

Proposal

Add a configuration option to the strategy, allowing the full authorization server path - or JWT token issuer, if we want to be more explicit - to be inputted. By doing so, we give users of the Gem more flexibility to set any value they need.

Let me know if this sounds like a good idea so I can work on a pull request for it.

@stevenharman
Copy link

Is this addressed by #31?

@tegon
Copy link
Author

tegon commented Nov 3, 2022

@stevenharman Looks like it does (although I don't work on that codebase anymore to test it myself).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants