es92/mongo-express-auth — pull request #1 by kunaldes (2013-04-28 20:41:46+00:00)
Title: Fix registration with existing username

In mongdb driver version 1.2.14 with a server running mogodb 2.2.4-rc0 if you call register with a username that already exists, it won't add it to the server, but it doesn't call the callback with an error.

Specifying safe:true checks to make sure the database actually adds it before calling the callback.