Skip to content

Commit

Permalink
fix: attemptRefreshingSession should not throw if the refresh call 401s
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Feb 6, 2024
1 parent 8707648 commit 234f991
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bundle/bundle.js

Large diffs are not rendered by default.

47 changes: 24 additions & 23 deletions lib/build/fetch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ts/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ export async function onUnauthorisedResponse(
// There is a case where the FE thinks the session is valid, but backend doesn't get the tokens.
// In this event, session expired error will be thrown and the frontend should remove this token
if (isUnauthorised && response.headers.get("front-token") === null) {
FrontToken.setItem("remove");
await FrontToken.setItem("remove");
}

fireSessionUpdateEventsIfNecessary(
Expand Down

0 comments on commit 234f991

Please sign in to comment.