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

Okta OpenID Connect Custom Auth Server Error #662

Open
nickryand opened this issue Feb 3, 2022 · 0 comments · May be fixed by #663
Open

Okta OpenID Connect Custom Auth Server Error #662

nickryand opened this issue Feb 3, 2022 · 0 comments · May be fixed by #663

Comments

@nickryand
Copy link

Expected behaviour

When using a custom authorization server, with OktaOpenIdConnect, the proper openid-configuration URL should be generated.

Actual behaviour

Okta OpenID Connect has two different URLs for the openid-configuration API.

  • https://${yourOktaDomain}/.well-known/openid-configuration
  • https://${yourOktaDomain}/oauth2/${authorizationServerId}/.well-known/openid-configuration

When using a authorization server the URL generation code truncates off the oauth2/${authorizationServerId} resulting in a 404 error when attempting to hit the openid-configuration URL. For the non-custom authorization server use case, the code works fine.

What are the steps to reproduce this issue?

  1. Setup a custom authorization server in Okta for OpenID Connect
  2. Set the SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL variable to your custom server URL
  3. Attempt to authenticate through the app.

Any logs, error output, etc?

I'm using this module through https://github.com/netbox-community/netbox which is currently pinned to version 4.1.0. The behavior I describe in this ticket is actually the opposite, custom-auth servers work and non-custom auth servers break. I wrote this issued based on this commit which sets up the behavior described in this issue.

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

Successfully merging a pull request may close this issue.

1 participant