kernicPanel
Follow
22.2K views | +0 today
kernicPanel
JavaScript, Node Js, Git, Vim, and more…
Curated by Nicolas Clerc
Your new post is loading...
Your new post is loading...
Scooped by Nicolas Clerc
Scoop.it!

Speeding up Mongoose queries by requesting only the fields you need

Speeding up Mongoose queries by requesting only the fields you need | kernicPanel | Scoop.it

I’m currently building a startup (ampcloud) with Node.js, MongoDB, Mongoose, and a handful of other tools. After spending quite a few years in the Django world, it’s been fun doing a mental context switch into the land of JavaScript, callbacks, and closures. Occasionally I’ve run into some gotchas, and this particular one is a great example.

more...
No comment yet.
Rescooped by Nicolas Clerc from Nodejs-code
Scoop.it!

Password Authentication with Mongoose and bcrypt

This post is Part 1 of a series on implementing username/password authentication for your Mongoose user models. In this first installment, we will discuss how to implement one-way encryption of user passwords with bcrypt, and how to subsequently use the encrypted password for login verification.

Via nodejs-code
more...
Göran Svensson's curator insight, September 17, 2013 10:03 PM

Great post! I would probably implement it with pbkdf2 and use 

https://github.com/ElmerZhang/ezcrypto based on Crypto JS. 

Scooped by Nicolas Clerc
Scoop.it!

Password Authentication with Mongoose (Part 2): Account Locking

This post is Part 2 (of 2) on implementing secure username/password authentication for your Mongoose User models. In Part 1 we implemented one-way password encryption and verification using bcrypt. Here in Part 2 we'll discuss how to prevent brute-force attacks by enforcing a maximum number of failed login attempts.

more...
No comment yet.