In a normal use case one has email and password, or other provider, but no medusa id.
So login, get token use token, but there is no way to get the id of the user.
I have tried /admin/users?email=${user.email} and this returns Error: No user is currently logged in. Using this /admin/users/{id} works (returns a user with id), but that means I need to have the ID beforehand. Which there is no way to get that id.
In a normal use case one has email and password, or other provider, but no medusa id. So login, get token use token, but there is no way to get the
id
of the user.I have tried
/admin/users?email=${user.email}
and this returnsError: No user is currently logged in
. Using this/admin/users/{id}
works (returns a user with id), but that means I need to have the ID beforehand. Which there is no way to get that id.Can the endpoint return the user
id