Track recently active and signin times (#663)
* Track recently active and signin times * Trust proxy headers in production
This commit is contained in:
@ -86,6 +86,9 @@ router.get('google.callback', async ctx => {
|
||||
await team.createFirstCollection(user.id);
|
||||
}
|
||||
|
||||
// not awaiting the promise here so that the request is not blocked
|
||||
user.updateSignedIn(ctx.request.ip);
|
||||
|
||||
ctx.cookies.set('lastSignedIn', 'google', {
|
||||
httpOnly: false,
|
||||
expires: new Date('2100'),
|
||||
|
Reference in New Issue
Block a user