I'm having a problem with authorization in react.js. I want to store user roles in application context but I don't know how to get them from JWT token. I found 3 possible solutions, which one of them is the best?
- encrypt JWT on client side.
- one more request to get user roles
- return user roles with jwt token ( something like { token: , roles : } ).
Maybe there is some better option that I don't know. Thanks for all advices.