I implement an auth endpoint which takes an email and password and returns a JWT token. Inside the JWT there is a payload containing the user ID. Does it matter from a REST/JWT standards perspective which of these approaches I take?
- return the token and let the client request the
/users/user_idresource on a callback with the decoded user_id and the token - return the entire user object with the token from the
/authendpoint for the convenience of the client.
(my question is implementation/library agnostic and about the api-design pattern)