Skip to content

Commit

Permalink
fixed auth issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jan 14, 2013
1 parent aec5e94 commit f033377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ var connect = function(url, collections) {
function(db, next) {
this.db = db;

if (url.username) {
db.authenticate(url.username, url.password, next);
if (options.username) {
db.authenticate(options.username, options.password, next);
} else {
next(null, true);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name":"mongojs",
"description":"a simple mongo module that implements the mongo api",
"keywords": ["mongo", "db", "mongodb"],
"version":"0.5.0",
"version":"0.5.1",
"repository": "git://github.com/gett/mongojs.git",
"author": "Ge.tt <[email protected]>",
"contributors": [
Expand Down

0 comments on commit f033377

Please sign in to comment.