K
Kinde6mo ago
hackerman

`getPermissions()` not returning latest data

Hi! I have a user with a role and a permission that is included as part of that role. however, when I do getPermissions() in the React Native SDK, it's returning an empty list of permissions - when I check for that specific permission with getPermission() it says isGranted: false However, in the Kinde UI, the user has that role (and thus the perms under that role) Is there anything I am missing? Thank you!
5 Replies
Daniel_Kinde
Daniel_Kinde6mo ago
Hi, Have you refreshed the token since updating the permissions?
hackerman
hackerman6mo ago
... lol - that was the fix, thank you!
Daniel_Kinde
Daniel_Kinde6mo ago
Great stuff
Sophia
Sophia5mo ago
Probably a silly question but I'm having the same issue...what is the best way to refresh the token after an update to permissions like this in the Next.js SDK?
hackerman
hackerman5mo ago
@Sophia prob not the most efficient but I am just doing forceTokenRefresh(); on application load
Want results from more Discord servers?
Add your server