Node-auther
What
A library for handling authentication.
Example usage
Below, err
is the same for all callbacks; a string that describes the error, if any. Otherwise it's null
.
If err
is anything else than null
, all other parameters are meaningless and should not be used.
// Creates a new authenticator object with all settings set to default values.var auth = auther; // Tests if the given user exists.auth; // Creates a new user, given an email and a password.auth; // Authenticates a user, given the users email, password and a TTL (in minutes) for the authentication.auth; // Authenticates a user, given the authentication token.auth; // Invalidates the given token.auth; // Confirm the given email using a confirmation token.auth; // Generates an authentication token for a particular user with a given TTL (in minutes).auth; // Updates a users password, given a authentication token and a new password.auth;``` Creating more advanced authenticators-------------------------------------coming soon... Notes-----* The token used to confirm a users email address is not guaranteed to be unique. It's just an identifier for each user. ToDo----* Throttling when a single single user makes too many failed login attempts.* Throttling when the number of failed logins are high system wide.