K
Kinde8mo 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_Kinde8mo ago
Hi, Have you refreshed the token since updating the permissions?
hackerman
hackermanOP8mo ago
... lol - that was the fix, thank you!
Daniel_Kinde
Daniel_Kinde8mo ago
Great stuff
Sophia
Sophia8mo 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
hackermanOP8mo 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