In my previous posts about CouchDB, I have used the same admin user for accessing CouchDB. Bu, CouchDB supports multiple users. we don’t have to use only one user.
To create a new user, we can make a simple web call. Here is an example using “postman”. This will create a user and put a user in the _users table.
We can also achieve the same thing making a REST call from within our NodeJS solution. Create a user using NodeJS. Doing this with the Nano API isn’t as straightforward as other operations because there is not create user call, so we must make the call basically manually.
We now have a user we can authenticate. Authenticating using the Nano NPM library is easy because there is an existing method to do just that.
Working with users for CouchDB is pretty easy. Hopefully this article helps you get started.