Auth object not updating after Leaving Organization (via OrganizationSwitcher) #4235
Open
4 tasks done
Labels
needs-triage
A ticket that needs to be triaged by a team member
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
Always
Publishable key
pk_test_YWxpdmUtY2hpcG11bmstOTcuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
Description:
I am using the
auth()
helper in a Next.js server component to return the Auth object of the currently active user. However, when I leave an organization using theOrganizationSwitcher
, the Auth object does not update unless the page is reloaded (refreshed). As a result, theorgId
value within the Auth object is not updated.Steps to Reproduce:
auth()
helper in a Next.js server component to get the Auth object.OrganizationSwitcher
.Expected Behavior:
The Auth object should update immediately after leaving an organization without needing to reload the page.
Actual Behavior:
The Auth object remains unchanged until the page is reloaded.
Environment
The text was updated successfully, but these errors were encountered: