@orbiting/backend-modules-auth
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -1,6 +0,16 @@ | ||
<a name="2.1.0"></a> | ||
# 2.1.0 (2017-12-21) | ||
<a name="2.2.0"></a> | ||
# 2.2.0 (2017-12-21) | ||
<a name="2.2.0"></a> | ||
# 2.2.0 (2017-12-21) | ||
### Features | ||
* **backend-modules-auth:** add possibility to provide hooks which are called after successful signI ([2ef00cb](https://github.com/orbiting/backend-modules/commit/2ef00cb)) | ||
<a name="2.1.0"></a> | ||
@@ -7,0 +17,0 @@ # 2.1.0 (2017-12-21) |
@@ -31,3 +31,5 @@ const session = require('express-session') | ||
// is the server running in development | ||
dev = false | ||
dev = false, | ||
// hooks are called upon successful signIn | ||
signInHooks = [] | ||
} = {}) => { | ||
@@ -154,2 +156,9 @@ if (server === null) { | ||
//call signIn hooks | ||
await Promise.all( | ||
signInHooks.map( hook => | ||
hook(user.id, pgdb) | ||
) | ||
) | ||
// success | ||
@@ -156,0 +165,0 @@ return res.redirect( |
{ | ||
"name": "@orbiting/backend-modules-auth", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "auth migrations, seeds, middleware, graphql schema and resolvers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
41927
1009