Revalidating cookie cache after updating session
Hey
I have a multi-tenancy setup with Nextjs and Better-auth (without using the organization plugin). I'm saving the user's active companyUuid to session and on the frontend side I call a Nextjs server function and update the companyUuid in the database session and refetch the session which kind of works, but after implementing the cookie cache the cache isn't invalidated. What should I do in this case? Or should I be implementing it differently?
0 Replies