Skip to content

Commit ba96727

Browse files
authored
Merge branch 'main' into jr/integration-build-serve
2 parents 857cc83 + d824e69 commit ba96727

36 files changed

Lines changed: 1122 additions & 40 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Fix `clerkFrontendApiProxy` to derive the `Clerk-Proxy-Url` header and Location rewrites from `x-forwarded-proto`/`x-forwarded-host` headers instead of the raw `request.url`. Behind a reverse proxy, `request.url` resolves to localhost, causing FAPI to receive an incorrect proxy URL. The fix uses the same forwarded-header resolution pattern as `ClerkRequest`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/fastify': minor
3+
---
4+
5+
Add Frontend API proxy support to `@clerk/fastify` via the `frontendApiProxy` option on `clerkPlugin`. When enabled, requests matching the proxy path (default `/__clerk`) are forwarded to Clerk's Frontend API, allowing Clerk to work in environments where direct API access is blocked by ad blockers or firewalls. The `proxyUrl` for auth handshake is automatically derived from the request when `frontendApiProxy` is configured.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
'@clerk/shared': patch
4+
---
5+
6+
Narrow the error conditions that trigger the unauthenticated flow (sign-out) to only high-confidence authentication failures (401, 422). Previously, all 4xx errors — including 429 rate limits — were treated as auth failures, which could sign users out during transient rate limiting. Non-auth errors from `setActive` now propagate to the caller instead of being silently swallowed.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/express': patch
3+
---
4+
5+
Fix empty path fallback for `frontendApiProxy` to prevent intercepting all requests when `path` resolves to an empty string

.changeset/hono-proxy-support.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/hono': minor
3+
---
4+
5+
Add Frontend API proxy support to `@clerk/hono` via the `frontendApiProxy` option on `clerkMiddleware`. When enabled, requests matching the proxy path (default `/__clerk`) are forwarded to Clerk's Frontend API, allowing Clerk to work in environments where direct API access is blocked by ad blockers or firewalls. The `proxyUrl` for auth handshake is automatically derived from the request when `frontendApiProxy` is configured.

.changeset/yellow-vans-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/expo": minor
3+
---
4+
5+
Adds support for Expo SDK 55

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ jobs:
305305
"nuxt",
306306
"react-router",
307307
"custom",
308+
"hono",
308309
]
309310
test-project: ["chrome"]
310311
include:

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,36 @@ jobs:
339339
comment-id: ${{ github.event.comment.id }}
340340
reactions: heart
341341

342+
- name: Minimize previous snapshot comments
343+
if: steps.version-packages.outputs.success == '1'
344+
uses: actions/github-script@v7
345+
with:
346+
github-token: ${{ secrets.CLERK_COOKIE_PAT }}
347+
script: |
348+
const { data: comments } = await github.rest.issues.listComments({
349+
owner: context.repo.owner,
350+
repo: context.repo.repo,
351+
issue_number: context.issue.number,
352+
per_page: 100,
353+
});
354+
355+
const snapshotComments = comments.filter(
356+
(comment) =>
357+
comment.body?.includes('the snapshot version command generated the following package versions')
358+
);
359+
360+
for (const comment of snapshotComments) {
361+
await github.graphql(`
362+
mutation MinimizeComment($id: ID!) {
363+
minimizeComment(input: { subjectId: $id, classifier: OUTDATED }) {
364+
minimizedComment {
365+
isMinimized
366+
}
367+
}
368+
}
369+
`, { id: comment.node_id });
370+
}
371+
342372
- name: Create snapshot release comment
343373
if: steps.version-packages.outputs.success == '1'
344374
uses: peter-evans/create-or-update-comment@v3.0.0

integration/presets/envs.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ const withWaitlistMode = withEmailCodes
136136
.setEnvVariable('private', 'CLERK_SECRET_KEY', instanceKeys.get('with-waitlist-mode').sk)
137137
.setEnvVariable('public', 'CLERK_PUBLISHABLE_KEY', instanceKeys.get('with-waitlist-mode').pk);
138138

139+
const withEmailCodesProxy = withEmailCodes
140+
.clone()
141+
.setId('withEmailCodesProxy')
142+
.setEnvVariable('private', 'CLERK_PROXY_ENABLED', 'true');
143+
139144
const withSignInOrUpFlow = withEmailCodes
140145
.clone()
141146
.setId('withSignInOrUpFlow')
@@ -222,6 +227,7 @@ export const envs = {
222227
withDynamicKeys,
223228
withEmailCodes,
224229
withEmailCodes_destroy_client,
230+
withEmailCodesProxy,
225231
withEmailCodesQuickstart,
226232
withEmailLinks,
227233
withKeyless,

integration/presets/longRunningApps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export const createLongRunningApps = () => {
8686
* Hono apps
8787
*/
8888
{ id: 'hono.vite.withEmailCodes', config: hono.vite, env: envs.withEmailCodes },
89+
{ id: 'hono.vite.withEmailCodesProxy', config: hono.vite, env: envs.withEmailCodesProxy },
8990
] as const;
9091

9192
const apps = configs.map(longRunningApplication);

0 commit comments

Comments
 (0)