KindeK
Kinde8mo ago
4 replies
Jenkis Khan

Refresh session in nextjs app router sdk for client UI

Hi Kinde team,

I'm implementing RBAC in my Next.js application and have a question about keeping permissions in sync. When I delete a permission from my admin panel:

1. How do refreshToken(), refreshData(), and refreshUserClaims() differ functionally?
2. Is there an automated way to update affected users' permissions both server and client-side?
3. I've noticed access tokens don't update automatically when permissions change - what's the recommended approach for this scenario?

Currently, users retain outdated permissions until their token expires or they re-login. I'd appreciate guidance on implementing real-time permission updates following a permission deletion.

Thanks!
Was this page helpful?