wellknownApi: Api<
    BaseQueryFn<
        string
        | FetchArgs,
        unknown,
        FetchBaseQueryError,
        {},
        FetchBaseQueryMeta,
    >,
    {
        configuration: QueryDefinition<
            string,
            BaseQueryFn<
                string
                | FetchArgs,
                unknown,
                FetchBaseQueryError,
                {},
                FetchBaseQueryMeta,
            >,
            never,
            WellKnownResponse,
            "wellknown",
            unknown,
        >;
    },
    "wellknown",
    never,
    typeof coreModuleName,
> = ...

RTK Query API for fetching the OIDC well-known configuration endpoint.

The well-known endpoint (.well-known/openid-configuration) provides OIDC Discovery information including:

  • authorization_endpoint - URL for authorization requests
  • token_endpoint - URL for token exchange
  • userinfo_endpoint - URL for user info retrieval
  • end_session_endpoint - URL for logout/session termination
  • revocation_endpoint - URL for token revocation
  • jwks_uri - URL for JSON Web Key Set
  • issuer - The OIDC issuer identifier
// Add to your Redux store
const store = configureStore({
reducer: {
[wellknownApi.reducerPath]: wellknownApi.reducer,
},
middleware: (getDefault) => getDefault().concat(wellknownApi.middleware),
});

// Fetch the configuration
const { data, error } = await store.dispatch(
wellknownApi.endpoints.configuration.initiate(wellknownUrl)
);