Skip to content

Conversation

@panteliselef
Copy link
Contributor

@panteliselef panteliselef commented Jan 31, 2026

Description

Improves useOrganizationCreationDefaultsCacheKeys and adds comments that better describe the intended use of authenticated in createCacheKeys.

Then intention is to have all "authenticated queries" (queries that depend on user or org) to be cleared from the cache in order to avoid rendering stale data about the user after they have signed out.

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:

Summary by CodeRabbit

  • Bug Fixes
    • Improved authentication handling for organization creation workflows
    • Fixed sign-out behavior to properly clear cached organization-related data

✏️ Tip: You can customize this high-level summary in your review settings.

…CreationDefaultsCacheKeys`

Adds comments that better describe the intended use of `authenticated` in `createCacheKeys`. Then intention is to have all "authenticated queries" (queries that depend on user or org) to be cleared from the cache in order to avoid rendering stale data about the user after they have signed out.
@changeset-bot
Copy link

changeset-bot bot commented Jan 31, 2026

⚠️ No Changeset found

Latest commit: 9da75af

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 31, 2026

@panteliselef is attempting to deploy a commit to the Clerk Production Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

These changes modify the organization creation defaults functionality by adding documentation to the cache keys parameter, updating authentication handling to be always enabled instead of conditional on user presence, and introducing sign-out detection with automatic query clearing. The modifications span documentation updates, cache key value assignments, and integration of sign-out lifecycle management into the hook's execution flow.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: using a static value for authenticated in the cache keys function, which is the primary focus of the changeset across all three modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nikosdouvlis
Copy link
Member

@anagstef Do we trust this contributor? Shall I let the workflows to run?

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 1, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7724

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7724

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7724

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7724

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7724

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7724

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7724

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7724

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7724

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7724

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7724

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7724

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7724

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7724

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7724

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7724

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7724

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7724

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7724

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7724

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7724

commit: 9da75af

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants