Start a new topic

Business Logic - Custom Endpoint: How can I get the username of the user making the request?

In a business logic custom endpoint, it looks like the "request.username" property is ALWAYS the appkey, rather than the user actually sending the request.



How can I get the actual username of the requesting user (from the authorization header)?

See http://support.kinvey.com/hc/communities/public/questions/200375423-Determine-If-Request-Made-with-Master-Secret
Ryan,



Normally, the username should ONLY be equal to the appKey when the master secret was used to login. Otherwise, the request.username should be the authenticated username. If this is not the case, then maybe something is wrong.



How are you seeing this "request.username" equal to the App Key? When testing from a device or webpage after a user has logged in? If so - something is definitely wrong.



If you are only seeing it when testing from the Kinvey API Console, this is normal.



Login or Signup to post a comment