Closed koopaluigi closed 7 years ago
The userdata is added in through the middleware the authentication process. As long as you are passing the token in the "x-access-token" header it will be passed automatically
If you want to get the user data from the token you can POST to "api/users/validate" and that will return the associated users data. You can also use this endpoint to determine if the user's token is valid
I am trying to add a team to my user in the iOS app but I am not sure how to get the req.userdata in the post method:
In the get methods I use the token to get information but I'm not sure how to get the userdata. These are my methods in the iOS app: