These are just examples. If you need to keep track the user session a secure method is to have a server side token stored on the db or redis only which can contain a set of claims the user can do. What is given to the client is another token which enough to identify the user and can map to the server token. The advantage this has is that you can expire the server token at any time, such as the case for locking a user out or if client tokens are stollen.