Browse Source

chore: invalidate token

pull/8027/head
Pranav C 9 months ago
parent
commit
03f5a3a8d3
  1. 9
      packages/nocodb/src/services/users/users.service.ts

9
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' };

Loading…
Cancel
Save