Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/full-impalas-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Remove cache revalidation hooks from pending session handling. This fixes unmounting issues from `SignIn` and `SignUp` AIOs during after-auth flows.
11 changes: 5 additions & 6 deletions packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,17 +1225,16 @@ export class Clerk implements ClerkInterface {
}
}

/**
* Hint to each framework, that the user will be signed out when `{session: null}` is provided.
*/
await onBeforeSetActive(newSession === null ? 'sign-out' : undefined);

if (newSession?.status === 'pending') {
await this.#handlePendingSession(newSession);
await onAfterSetActive();
return;
}

/**
* Hint to each framework, that the user will be signed out when `{session: null}` is provided.
*/
await onBeforeSetActive(newSession === null ? 'sign-out' : undefined);

//1. setLastActiveSession to passed user session (add a param).
// Note that this will also update the session's active organization
// id.
Expand Down
Loading