Skip to content

Commit 5cda3ee

Browse files
fix(shared): improve single-session sign-in/sign-up dev warning wording (#8488)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da11557 commit 5cda3ee

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/shared": patch
3+
---
4+
5+
Improved the `cannot_render_single_session_enabled` dev warning to use friendlier wording. The message now clearly states that the behavior is expected and points developers to the Clerk Dashboard to enable multi-session mode if needed.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { describe, expect, it } from 'vitest';
2+
3+
import { warnings } from '../warnings';
4+
5+
describe('warnings', () => {
6+
describe('cannotOpenSignInOrSignUp', () => {
7+
it('explains that the behavior is expected', () => {
8+
expect(warnings.cannotOpenSignInOrSignUp).toContain('expected behavior');
9+
});
10+
11+
it('mentions single-session mode', () => {
12+
expect(warnings.cannotOpenSignInOrSignUp).toContain('single-session mode');
13+
});
14+
15+
it('mentions multi-session as the resolution', () => {
16+
expect(warnings.cannotOpenSignInOrSignUp).toContain('multi-session mode');
17+
});
18+
19+
it('includes the development notice', () => {
20+
expect(warnings.cannotOpenSignInOrSignUp).toContain('This notice only appears in development');
21+
});
22+
});
23+
});

packages/shared/src/internal/clerk-js/warnings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const warnings = {
5353
cannotOpenCheckout:
5454
'The Checkout drawer cannot render unless a user is signed in. Since no user is signed in, this is no-op.',
5555
cannotOpenSignInOrSignUp:
56-
'The SignIn or SignUp modals do not render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, this is no-op.',
56+
'The <SignIn/> and <SignUp/> modals are hidden because a user is already signed in and this application is configured for single-session mode. This is expected behavior — no action is needed. To allow rendering while signed in, enable multi-session mode in your Clerk Dashboard.',
5757
cannotRenderAPIKeysComponent:
5858
'The <APIKeys/> component cannot be rendered when API keys is disabled. Since API keys is disabled, this is no-op.',
5959
cannotRenderAPIKeysComponentForOrgWhenUnauthorized:

0 commit comments

Comments
 (0)