Skip to content

Conversation

@dstaley
Copy link
Member

@dstaley dstaley commented Feb 5, 2025

Description

This PR updates the onBeforeSetActive handler to only run the invalidateCacheAction server action on Next.js v14, since the router cache in v15 is less aggressive. This also works around an issue when v15 apps are deployed to Vercel where server actions reject when their response is rewritten by middleware, causing sign out functionality on protected routes to not work correctly.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel
Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 0:31am

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2025

🦋 Changeset detected

Latest commit: 403ad83

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/nextjs Patch

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

@panteliselef
Copy link
Member

#5171 includes a similar solution, and also expands on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants