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. Common fields include:

  • issuer - The OIDC issuer identifier (required)
  • authorization_endpoint - URL for authorization requests (required)
  • token_endpoint - URL for token exchange (required)
  • userinfo_endpoint - URL for user info retrieval
  • end_session_endpoint - URL for logout/session termination
  • revocation_endpoint - URL for token revocation

See WellKnownResponse type from @forgerock/sdk-types for the complete list of available fields.

// 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)
);