Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing user name and password in CouchDB _user database

I am using jquery.couch.js to do signup/login/logout to a CouchDB _users database in my Sproutcore application. Is anyone aware of a method for changing user _id and password?

like image 515
Logic Artist Avatar asked Apr 05 '11 21:04

Logic Artist


1 Answers

As far as I know the user id cannot be changed but the password can.

The CouchDB documentation describes the process of changing a user password in detail, short:

  • Get the org.couchdb.user:<myuser> document

  • Add a password field with the plaintext password

  • Store the document back to the _users database

As soon as the document is in the database, the CouchDB rehashes the plaintext password using PBKDF2 (at least since CouchDB 1.3).

like image 157
Doc Brown Avatar answered Sep 25 '22 03:09

Doc Brown