title: Authentication Failed Mongoose
body: <p>I'm trying to enable auth into my mongo server. I've already done:</p>
  
  <p>-Configured security into mongo.conf</p>
  
  <p>-Created the users(if use it with mongo -u -p..... from console works fine)</p>
  
  <p>In the node server js my config is this</p>
  
  <pre><code>mongoose.connect(mongodb://user:pass@localhost:27017/dbName);
  </code></pre>
  
  <p>Also I've already tried with </p>
  
  <pre><code>mongoose.connect(mongodb://user:pass@localhost:27017/dbName,{auth:{authdb:"admin"}});
  </code></pre>
  
  <p>And this</p>
  
  <pre><code>mongoose.connect(mongodb://user:pass@localhost:27017/dbName,{auth:{authdb:"dbName"}});
  </code></pre>
  
  <p>And always get this error:</p>
  
  <pre><code>Authentication failed
  </code></pre>
  
  <p>What would be doing wrong?</p>