Skip to content

fix: keep the issuer path in the OIDC discovery URL - #111

Open
official-burak wants to merge 1 commit into
okta:masterfrom
official-burak:fix/oidc-discovery-keep-issuer-path
Open

fix: keep the issuer path in the OIDC discovery URL#111
official-burak wants to merge 1 commit into
okta:masterfrom
official-burak:fix/oidc-discovery-keep-issuer-path

Conversation

@official-burak

@official-burak official-burak commented Sep 1, 2026

Copy link
Copy Markdown

PR Checklist

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix

What is the current behavior?

Issuer.discover(new URL('/.well-known/openid-configuration', issuer)) treats that path as origin-relative. A custom authorization server such as https://{yourOktaDomain}/oauth2/default then requests /.well-known/openid-configuration on the org root instead of under /oauth2/default.

Issue Number: #110

What is the new behavior?

Discovery is built from a trailing-slash issuer base plus a relative .well-known/openid-configuration suffix, so the issuer path is kept. Org-level issuers still hit /.well-known/openid-configuration. Unit tests cover both a path issuer and a trailing slash.

Does this PR introduce a breaking change?

  • Yes
  • No

A leading slash on /.well-known/openid-configuration is origin-relative, so custom authorization servers such as https://{domain}/oauth2/default were discovering from the org root.

Resolves: okta#110
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

Successfully merging this pull request may close these issues.

1 participant