testing auth
This commit is contained in:
@@ -20,6 +20,8 @@ const removeOldTokens = async(userID: string, ipAddress: string | undefined, old
|
||||
|
||||
try {
|
||||
|
||||
console.log("removing token with IP address", ipAddress);
|
||||
|
||||
const minusTime = oldTime - (1000 * 60 * 60);
|
||||
|
||||
ipAddress = ipAddress ? ipAddress : "";
|
||||
@@ -66,6 +68,11 @@ const authRefresh = async(req: RequestType, res: Response, next: NextFunction) =
|
||||
}
|
||||
}
|
||||
|
||||
if (!tokenFound) {
|
||||
console.log("token not found", encryptedToken);
|
||||
console.log("token list", user.tokens);
|
||||
}
|
||||
|
||||
if (!tokenFound) throw new Error("Refresh Token Not Found");
|
||||
|
||||
req.user = user;
|
||||
|
||||
Reference in New Issue
Block a user