bjerkio/oidc-react

Check if ".well-known/openid-configuration" exist in authority string

jnschbrt opened this issue · 3 comments

Using oidc-react version 2.1.0
No problem with version 1.5.1.

When providing a authority with ".well-known/openid-configuration" at the end, the AuthProvider concats another ".well-known/openid-configuration" at the end.

const authProviderConfig: AuthProviderProps = {
      authority: "https://myidp.com/auth/realms/test/.well-known/openid-configuration",
      clientId: "myclientid",
      scope: "profile email openid",
      responseType: "code",
      redirectUri: window.location.href,
      autoSignIn: true,
      onSignIn: () => {
        navigate("/");
      },
    };

GET Request goes to:
https://myidp.com/auth/realms/test/.well-known/openid-configuration/.well-known/openid-configuration

Authority should be your base IDP url e.g. authority: "https://myidp.com/auth/realms/test

Authority should be your base IDP url e.g. authority: "https://myidp.com/auth/realms/test

i know.. apparently, the existence of the substring was checked in earlier versions.

This might be an issue related to https://github.com/authts/oidc-client-ts. We are not adding any of this, so I think so.

Let me know if I'm wrong. Closing this for now :)