How to query user by email?



I am trying to implement some user management features with Sync Gateway. I create users by generating a UUID as the name, and setting the email and password. The user will use their email to login to my application. I don’t want to use a user-provided value for name since you can’t change it later.

I need to authenticate the user with my own web service in order to generate the auth cookie (as per docs), but I don’t see any way to query the _user endpoint to find a user by email? If you list all users, you only see the name, and I have not seen anything in the docs to allow you to get a user account by email instead of name?


There’s no search facility for user accounts. You’d need to keep an email-to-UUID index yourself, maybe in an external bucket.


Thanks jens, just wanted to make sure there wasn’t an undocumented search capability or another way to accomplish this.