Skip to content

Commit

Permalink
Merge pull request #10 from Kapii1/main
Browse files Browse the repository at this point in the history
Add the support of Client Secret
  • Loading branch information
garronej authored Jan 31, 2024
2 parents 10f5965 + 025ccfe commit 4117df2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/oidc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export type ParamsOfCreateOidc<
> = {
issuerUri: string;
clientId: string;
clientSecret?: string;
transformUrlBeforeRedirect?: (url: string) => string;
/**
* Extra query params to be added on the login url.
Expand Down Expand Up @@ -90,6 +91,7 @@ export async function createOidc<
const {
issuerUri,
clientId,
clientSecret,
transformUrlBeforeRedirect = url => url,
extraQueryParams: extraQueryParamsOrGetter,
publicUrl: publicUrl_params,
Expand Down Expand Up @@ -126,6 +128,7 @@ export async function createOidc<
const oidcClientTsUserManager = new OidcClientTsUserManager({
"authority": issuerUri,
"client_id": clientId,
"client_secret": clientSecret,
"redirect_uri": "" /* provided when calling login */,
"response_type": "code",
"scope": "openid profile",
Expand Down

0 comments on commit 4117df2

Please sign in to comment.