From 03f5a3a8d392239c1c790dba442a57ef5e4c6a12 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 2 Apr 2024 12:10:44 +0000 Subject: [PATCH] chore: invalidate token --- packages/nocodb/src/services/users/users.service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/nocodb/src/services/users/users.service.ts b/packages/nocodb/src/services/users/users.service.ts index 7f5dd914ed..d504f3292c 100644 --- a/packages/nocodb/src/services/users/users.service.ts +++ b/packages/nocodb/src/services/users/users.service.ts @@ -542,11 +542,10 @@ export class UsersService { this.clearCookie(param); const user = (param.req as any).user; if (user?.id) { - // await User.update(user.id, { - // refresh_token: null, - // token_version: randomTokenString(), - // }); - // todo: clear only token present in cookie + await User.update(user.id, { + token_version: randomTokenString(), + }); + // todo: clear only token present in cookie to avoid invalidating all refresh token await UserRefreshToken.deleteAllUserToken(user.id); } return { msg: 'Signed out successfully' };