Skip to content

Commit cc8d35c

Browse files
committed
Fix session status check within setActive
1 parent 6dda4cc commit cc8d35c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/clerk-js/bundlewatch.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
3-
{ "path": "./dist/clerk.js", "maxSize": "622.25KB" },
4-
{ "path": "./dist/clerk.browser.js", "maxSize": "76KB" },
3+
{ "path": "./dist/clerk.js", "maxSize": "625KB" },
4+
{ "path": "./dist/clerk.browser.js", "maxSize": "78KB" },
55
{ "path": "./dist/clerk.legacy.browser.js", "maxSize": "117KB" },
66
{ "path": "./dist/clerk.headless*.js", "maxSize": "61KB" },
77
{ "path": "./dist/ui-common*.js", "maxSize": "113KB" },

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import type {
2828
AuthenticateWithGoogleOneTapParams,
2929
AuthenticateWithMetamaskParams,
3030
AuthenticateWithOKXWalletParams,
31+
Clerk as ClerkInterface,
3132
ClerkAPIError,
3233
ClerkAuthenticateWithWeb3Params,
33-
Clerk as ClerkInterface,
3434
ClerkOptions,
3535
ClientJSONSnapshot,
3636
ClientResource,
@@ -1267,7 +1267,7 @@ export class Clerk implements ClerkInterface {
12671267
}
12681268

12691269
// Do not revalidate server cache for pending sessions to avoid unmount of `SignIn/SignUp` AIOs when navigating to task
1270-
if (!sessionIsPending) {
1270+
if (newSession?.status !== 'pending') {
12711271
/**
12721272
* Hint to each framework, that the user will be signed out when `{session: null}` is provided.
12731273
*/
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
'use client';
22

33
export {
4-
AuthenticateWithRedirectCallback,
5-
ClerkDegraded,
6-
ClerkFailed,
74
ClerkLoaded,
85
ClerkLoading,
6+
ClerkDegraded,
7+
ClerkFailed,
8+
SignedOut,
9+
SignedIn,
910
Protect,
10-
RedirectToCreateOrganization,
11-
RedirectToOrganizationProfile,
1211
RedirectToSignIn,
1312
RedirectToSignUp,
1413
RedirectToTasks,
1514
RedirectToUserProfile,
16-
SignedIn,
17-
SignedOut,
15+
AuthenticateWithRedirectCallback,
16+
RedirectToCreateOrganization,
17+
RedirectToOrganizationProfile,
1818
} from '@clerk/clerk-react';
1919

2020
export { MultisessionAppSupport } from '@clerk/clerk-react/internal';

0 commit comments

Comments
 (0)