Fork me on GitHub

Beside the required implementation you have to provide, you can also provide optional implementation of password crypt mechanism. The default password crypt is scrypt. If you want to provide your own password crypt logic, you have to provide both of methods below.

api.AuthImpl.encodePassword(password, callback)

Encodes provided raw password string.

api.AuthImpl.matchPassword(cryptedPassword, password, callback)

Match provided password with its cryptedPassword.