Skip to content

Commit

Permalink
Merge pull request #60 from kinde-oss/leo/logout_redirect
Browse files Browse the repository at this point in the history
fix: logout redirect is not required
  • Loading branch information
coel authored Apr 19, 2024
2 parents a863827 + 6e968b3 commit 264baaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sdk/oauth2-flows/AuthCodeAbstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export abstract class AuthCodeAbstract {

constructor(protected readonly config: AuthorizationCodeOptions) {
const { authDomain, logoutRedirectURL } = config;
this.logoutEndpoint = `${authDomain}/logout?redirect=${logoutRedirectURL}`;
this.logoutEndpoint = `${authDomain}/logout?redirect=${logoutRedirectURL ?? ''}`;
this.userProfileEndpoint = `${authDomain}/oauth2/v2/user_profile`;
this.authorizationEndpoint = `${authDomain}/oauth2/auth`;
this.tokenEndpoint = `${authDomain}/oauth2/token`;
Expand Down
2 changes: 1 addition & 1 deletion lib/sdk/oauth2-flows/ClientCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ClientCredentials {

constructor(private readonly config: ClientCredentialsOptions) {
const { authDomain, logoutRedirectURL } = config;
this.logoutEndpoint = `${authDomain}/logout?redirect=${logoutRedirectURL}`;
this.logoutEndpoint = `${authDomain}/logout?redirect=${logoutRedirectURL ?? ''}`;
this.tokenEndpoint = `${authDomain}/oauth2/token`;
this.config = config;
const keyProvider = async () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/sdk/oauth2-flows/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface OAuth2CCTokenResponse {

export interface OAuth2FlowOptions {
clientId: string;
logoutRedirectURL: string;
logoutRedirectURL?: string;
authDomain: string;
audience?: string | string[];
scope?: string;
Expand Down

0 comments on commit 264baaa

Please sign in to comment.