K
Kinde7mo 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_Kinde7mo ago
Hi, Have you refreshed the token since updating the permissions?
hackerman
hackermanOP7mo ago
... lol - that was the fix, thank you!
Daniel_Kinde
Daniel_Kinde7mo ago
Great stuff
Sophia
Sophia7mo 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
hackermanOP6mo 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