Skip to content

Commit 9a01afa

Browse files
authored
fix(clerk-js): Use isSignedIn to determine auth state on checkout instance creation (#6370)
1 parent e6f204a commit 9a01afa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/big-sides-go.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+
Fix authentication state resolution when creating checkout instance

packages/clerk-js/src/core/modules/checkout/instance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function createCheckoutInstance(
2424
): __experimental_CheckoutInstance {
2525
const { for: forOrganization, planId, planPeriod } = options;
2626

27-
if (!clerk.user) {
27+
if (!clerk.isSignedIn || !clerk.user) {
2828
throw new Error('Clerk: User is not authenticated');
2929
}
3030

0 commit comments

Comments
 (0)