Skip to content

Commit

Permalink
Merge pull request #1738 from ntamotsu/patch-1
Browse files Browse the repository at this point in the history
allow empty string for client_secret in TokenClient
  • Loading branch information
pamapa authored Dec 18, 2024
2 parents ef3a385 + 7cd651a commit 743783e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/TokenClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class TokenClient {
let basicAuth: string | undefined;
switch (this._settings.client_authentication) {
case "client_secret_basic":
if (!client_secret) {
if (client_secret === undefined || client_secret === null) {
logger.throw(new Error("A client_secret is required"));
throw null; // https://github.com/microsoft/TypeScript/issues/46972
}
Expand Down Expand Up @@ -173,7 +173,7 @@ export class TokenClient {
let basicAuth: string | undefined;
switch (this._settings.client_authentication) {
case "client_secret_basic":
if (!client_secret) {
if (client_secret === undefined || client_secret === null) {
logger.throw(new Error("A client_secret is required"));
throw null; // https://github.com/microsoft/TypeScript/issues/46972
}
Expand Down Expand Up @@ -229,7 +229,7 @@ export class TokenClient {
let basicAuth: string | undefined;
switch (this._settings.client_authentication) {
case "client_secret_basic":
if (!client_secret) {
if (client_secret === undefined || client_secret === null) {
logger.throw(new Error("A client_secret is required"));
throw null; // https://github.com/microsoft/TypeScript/issues/46972
}
Expand Down

0 comments on commit 743783e

Please sign in to comment.