This "issue" is a mixture of me not being sure how stuff works and a design question.
When I'm authenticating myself I do a
POST /auth/login username=foo password=bar
Once I have my token back, Im using the token to auth against my next action, in this case adding credits.
POST /users/{userId}/credits/add credits=1500
How do I get this userId? I could handle this on the clientside by listing all users with GET /users and then pattern match the username i was authentication myself intially but somehow it doesnt feel right. Is this how its supposed to work? Or would it be more clean to if the AuthSuccess Schema also responds with my userid (besides the token) ?
This "issue" is a mixture of me not being sure how stuff works and a design question.
When I'm authenticating myself I do a
Once I have my token back, Im using the token to auth against my next action, in this case adding credits.
How do I get this userId? I could handle this on the clientside by listing all users with
GET /users
and then pattern match the username i was authentication myself intially but somehow it doesnt feel right. Is this how its supposed to work? Or would it be more clean to if the AuthSuccess Schema also responds with my userid (besides the token) ?Any help appreciated :)