Skip to content

Configuration

import { defineConfig } from "elysia-openid-client/config";
const options: OIDCClientOptions = defineConfig({
// ...
});
const rp = await OidcClient.factory(options);

Minumum requirements

{
issuerUrl: "https://issuer.example.com/",
baseUrl: "https://your-service.example.com",
clientMetadata: {
client_id: "client-id",
client_secret: "client-secret",
},
}

Reference

interface OIDCClientOptions {
issuerUrl: string;
baseUrl: string;
settings?: Partial<OIDCClientSettings>;
authHookSettings?: Partial<OIDCClientAuthHookSettings>;
cookieSettings?: Partial<OIDCClientCookieSettings>;
dataAdapter?: OIDCClientDataAdapter;
logger?: OIDCClientLogger | null;
clientMetadata: ClientMetadata & {
client_secret: string;
};
authParams?: AuthorizationParameters;
}