Redis and session timeout added
This commit is contained in:
@@ -6,6 +6,7 @@ class AuthController {
|
||||
this.login = this.login.bind(this);
|
||||
this.forgotPassword = this.forgotPassword.bind(this);
|
||||
this.activateAccount = this.activateAccount.bind(this);
|
||||
this.logout = this.logout.bind(this);
|
||||
}
|
||||
|
||||
async register(req, res) {
|
||||
@@ -33,6 +34,11 @@ class AuthController {
|
||||
}
|
||||
}
|
||||
|
||||
async logout(req, res) {
|
||||
const { userid: hashedUserId } = req.headers;
|
||||
await userService.logoutUser(hashedUserId);
|
||||
}
|
||||
|
||||
async forgotPassword(req, res) {
|
||||
const { email } = req.body;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user