KindeK
Kinde13mo ago
36 replies
Stephen

Refresh claims approach

Hi, I'm trying to figure out how to refresh claims / user details with Kinde. There are few scenarios I'm trying to solve this for:

- As part of registration activities a user might be allocated to an organisation & role via the M2M API. Their original access token doesn't have these claims and they end up with forbidden access. I understand the why as the Nuxt server is using the cached values.
- Users might have their roles changes within an admin section using the M2M API.

If I log the user out and in again, it works fine. If I refresh the claims using refreshUserClaims() in the management API (either via the JavaScript SDK or .NET SDKs) then nothing happens and the user still gets forbidden access issues from my application (I do get a success response from Kinde when calling the refresh API).

With Kinde, how are you supposed to handle this? Ideally without logging out and in again.
Was this page helpful?