Authentification module for tutor.
Via npm (at least version 2 for user packages):
npm install --save @tutor/auth
The package exports a function that creates the necessary express api calls
var authentification = function(name, pw) {
// you should use a better authentification
console.error('dummy authentification!')
return name == pw
};
require('@tutor/auth')(connection, RethinkdbDriver, authentification)You must explicitly pass the connection and the driver. This package uses express-session-rethinkdb
under the hood and that currently only works if the correct driver is passed through.