adrien2p / medusa-plugins

A collection of awesome plugins for medusa :rocket:
https://medusa-plugins.vercel.app
MIT License
161 stars 46 forks source link

Return id of user alongside accessToken (firebase) #161

Closed kevinrobert3 closed 7 months ago

kevinrobert3 commented 7 months ago

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.

Can the endpoint return the user id

kevinrobert3 commented 7 months ago

🤦🏽‍♂️ /admin/auth has and returns the user