-
Notifications
You must be signed in to change notification settings - Fork 121
fix: init clerk only on cloud #3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
commit: |
Graphite Automations"Test" took an action on this PR • (10/01/25)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |
Merge activity
|
### TL;DR Conditionally initialize Clerk authentication based on app type ### What changed? Modified the `auth.ts` file to only initialize the Clerk authentication client when the application is running in cloud mode. When not in cloud mode, the clerk variable is set to null (cast as Clerk type). ### How to test? 1. Verify that authentication works correctly in cloud environments 2. Confirm that the application doesn't attempt to initialize Clerk in non-cloud environments 3. Check that no authentication errors occur in either environment ### Why make this change? This change prevents unnecessary Clerk initialization in non-cloud environments where authentication might be handled differently or not needed. This improves efficiency and prevents potential errors from attempting to use Clerk with invalid or missing credentials in development or other non-cloud contexts.
TL;DR
Conditionally initialize Clerk authentication based on app type
What changed?
Modified the
auth.ts
file to only initialize the Clerk authentication client when the application is running in cloud mode. When not in cloud mode, the clerk variable is set to null (cast as Clerk type).How to test?
Why make this change?
This change prevents unnecessary Clerk initialization in non-cloud environments where authentication might be handled differently or not needed. This improves efficiency and prevents potential errors from attempting to use Clerk with invalid or missing credentials in development or other non-cloud contexts.