AdminAuthResource
This class is used to send requests to Admin Auth API Routes. All its method
are available in the JS Client under the medusa.admin.auth
property.
The methods in this class allow admin users to manage their session, such as login or log out. You can send authenticated requests for an admin user either using the Cookie header, their API token, or the JWT Token. When you log the admin user in using the createSession method, the JS client will automatically attach the cookie header in all subsequent requests.
Related Guide: How to implement user profiles.
Methods
getSession
Get the currently logged in user's details. Can also be used to check if there is an authenticated user.