DEV Community

Discussion on: How do you handle role/permissions updates with JWT?

Collapse
 
bespunky profile image
Shy Agam

I would separate permissions and authorization.
Have an endpoint fetch the permissions of a user authorized by a token.

This gives you better flow control and allows mechanisms like caching, real time permissions updates, etc.

Collapse
 
huzairuje profile image
huzairuje • Edited

this is actually good, differentiation on each job, make the API clean. thank you. i wish i could like this comment more than one