Skip to content

Commit

Permalink
fix: plumb through api playground authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Nov 19, 2024
1 parent 4442640 commit 893dc5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ui/app/src/playground/utils/auth-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ export function buildAuthHeaders(
} catch {}
}

const tokenPrefix = authState.oauth?.tokenPrefix || "Bearer";
const tokenPrefix = oAuthClientCredentials.value.tokenPrefix ?? "Bearer";

headers["Authorization"] =
headers[
pascalCaseHeaderKey(oAuthClientCredentials.value.headerName || "Authorization")
] =
`${tokenPrefix.length ? `${tokenPrefix} ` : ""}${redacted ? obfuscateSecret(token) : token}`;
},
});
Expand Down

0 comments on commit 893dc5d

Please sign in to comment.