Skip to content

Commit

Permalink
Avoid caching auth related calls (#148)
Browse files Browse the repository at this point in the history
* Avoid caching auth related calls

* Add generated changelog entries

* Fix tests

---------

Co-authored-by: svc-changelog <[email protected]>
  • Loading branch information
ericanderson and svc-changelog authored Mar 26, 2024
1 parent c22cce1 commit 58241de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/legacy-client/changelog/@unreleased/pr-148.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fix
fix:
description: Avoid caching auth related calls
links:
- https://github.com/palantir/osdk-ts/pull/148
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe("ConfidentialClientFlow", () => {
{
body:
"grant_type=client_credentials&client_id=testClientId&client_secret=testClientSecret&scopes=offline_access+api%3Aread+api%3Awrite",
cache: "no-cache",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
Expand Down Expand Up @@ -97,6 +98,7 @@ describe("ConfidentialClientFlow", () => {
{
body:
"client_id=testClientId&client_secret=testClientSecret&token=testAccessToken",
cache: "no-cache",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export async function fetchFormEncoded(
"Content-Type": "application/x-www-form-urlencoded",
},
method: "POST",
cache: "no-cache",
});

return response;
Expand Down

0 comments on commit 58241de

Please sign in to comment.