Compare commits
No commits in common. "46dd4ccb915ca1819bbbd702b29dec07dc550af6" and "91499578c4f3d5bd49696e27ff52920b644568c2" have entirely different histories.
46dd4ccb91
...
91499578c4
|
|
@ -79,15 +79,6 @@ export class AuthController {
|
||||||
this.sendToken(user, res, {long: longExpiration})
|
this.sendToken(user, res, {long: longExpiration})
|
||||||
})
|
})
|
||||||
|
|
||||||
public handleLogout = catchAsync(async (req: AppRequest, res, next) => {
|
|
||||||
// Set the jwt cookie to a dummy value and set the expiration to a date in the past
|
|
||||||
res.cookie('jwt', 'loggedout', {
|
|
||||||
expires: new Date(Date.now() - 10000),
|
|
||||||
httpOnly: true
|
|
||||||
})
|
|
||||||
res.status(200).json({status: 'success'})
|
|
||||||
})
|
|
||||||
|
|
||||||
public protect = catchAsync(async (req: AppRequest, res, next) => {
|
public protect = catchAsync(async (req: AppRequest, res, next) => {
|
||||||
let token: string | undefined;
|
let token: string | undefined;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue