- fix test command in
package.json
- use eslint
- update dependencies
- use make instead grunt
- use
req.originalUrl
insteadreq.url
for redirect - update dependencies
- add
pipe
method to pipe events from child modules to parent module
- use
req.session.regenerate
insteadreq.session.destroy
(fix #1)
- fix
restrict
by usingconfig.login.route
insteadconfig.loginRoute
- drop unnecessary development dependencies
- update docs
-
improve documentation
-
restrict()
function changedInstead of checking for
req.session.name
andreq.session.email
it now checks forreq.session.loggedIn
. -
add function
qr()
to generate link to QR code imagevar config = { key: 'abcd1234', email: 'mirco.zeiss@gmail.com' }; var link = util.qr(config); // https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=otpauth%3A%2F%2Ftotp%2FLockit%3Amirco.zeiss%40gmail.com%3Fsecret%3DMFRGGZBRGI2DI%3D%3D%3D%26issuer%3DLockit
-
add function
verify()
to verify two-factor authentication tokenvar key = 'abcd1234'; var token = '236709'; var valid = util.verify(token, key); if (valid) { // continue here }
-
add function
destroy()
to destroy sessionsutil.destroy(req, function() { // user is now logged out });
-
split tests into multiple files
-
update development dependencies
- make
getDatabase()
work with String and Object