Skip to content

Commit 2d791f3

Browse files
committed
Merge branch 'main' into vaggelis/user-4002-implement-the-aio-components-new-flow-and-session-task
2 parents 833763c + a11c2da commit 2d791f3

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.changeset/two-candles-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Reverts the changes introduced in [PR #7105](https://github.com/clerk/javascript/pull/7105), as it was causing JWTs returned from client piggybacking not to be inserted into the cache even though their claims had actually changed.

packages/clerk-js/src/core/resources/Session.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,9 @@ export class Session extends BaseResource implements SessionResource {
131131
};
132132

133133
#hydrateCache = (token: TokenResource | null) => {
134-
if (!token) {
135-
return;
136-
}
137-
138-
const tokenId = this.#getCacheId();
139-
const existing = SessionTokenCache.get({ tokenId });
140-
if (!existing) {
134+
if (token) {
141135
SessionTokenCache.set({
142-
tokenId,
136+
tokenId: this.#getCacheId(),
143137
tokenResolver: Promise.resolve(token),
144138
});
145139
}

0 commit comments

Comments
 (0)