fix(clerk-js): Respect proxyUrl and domain in non-browser environments#8095
fix(clerk-js): Respect proxyUrl and domain in non-browser environments#8095
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 870b2b9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
📝 WalkthroughWalkthroughThis change adds support for proxyUrl and domain configuration in non-browser environments for Clerk packages. The modifications include: adding validation logic for proxyUrl in native runtimes to ensure absolute URLs, implementing getter methods in Clerk.ts that handle function-type values by logging warnings and returning empty strings in non-browser contexts, introducing a new assertValidProxyUrl utility function for runtime checks, adding warning messages for unsupported function-type properties, and extending test coverage to verify correct baseUrl resolution behavior in non-browser runtimes when domain or proxyUrl are configured. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
Description
It's possible for non-browser environments to provide a
domainorproxyUrl, butclerk-jscurrently ignores the provided values when not in a browser. This PR updatesclerk-jsso the provided value is now respected in non-browser environments.The only caveat is that we cannot accept a function for the value in expo, as we are unable to provide the current base URL (
window.location.href).fixes AIE-644
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Bug Fixes
Tests