Browse Source

fix(nocodb): update user only if user id is given and reset token_version

pull/5905/head
Wing-Kam Wong 1 year ago
parent
commit
01b81f53bc
  1. 5
      packages/nocodb/src/services/users/users.service.ts

5
packages/nocodb/src/services/users/users.service.ts

@ -493,13 +493,14 @@ export class UsersService {
};
}
async signout(param: { res: any; req: any }) {
async signOut(param: { res: any; req: any }) {
try {
param.res.clearCookie('refresh_token');
const user = (param.req as any).user;
if (user) {
if (user?.id) {
await User.update(user.id, {
refresh_token: null,
token_version: null,
});
}
return { msg: 'Signed out successfully' };

Loading…
Cancel
Save