mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 03:53:28 +02:00
Save user IP to database.
This commit is contained in:
@@ -11,7 +11,11 @@ module.exports = function(options) {
|
||||
, redir = urlutil.removeParam(req.url, 'jwt')
|
||||
if (data) {
|
||||
// Redirect once to get rid of the token
|
||||
dbapi.saveUserAfterLogin(data)
|
||||
dbapi.saveUserAfterLogin({
|
||||
name: data.name
|
||||
, email: data.email
|
||||
, ip: req.ip
|
||||
})
|
||||
.then(function() {
|
||||
req.session.jwt = data
|
||||
res.redirect(redir)
|
||||
|
||||
Reference in New Issue
Block a user