Browse Source

refactor: remove refresh token from user table

pull/8027/head
Pranav C 8 months ago
parent
commit
c7d6915068
  1. 2
      packages/nocodb/src/helpers/initAdminFromEnv.ts
  2. 3
      packages/nocodb/src/models/User.ts
  3. 1
      packages/nocodb/src/utils/sanitiseUserObj.ts

2
packages/nocodb/src/helpers/initAdminFromEnv.ts

@ -218,7 +218,6 @@ export default async function initAdminFromEnv(_ncMeta = Noco.ncMeta) {
password,
email_verification_token,
token_version: randomTokenString(),
refresh_token: null,
},
ncMeta,
);
@ -246,7 +245,6 @@ export default async function initAdminFromEnv(_ncMeta = Noco.ncMeta) {
password,
email_verification_token,
token_version: randomTokenString(),
refresh_token: null,
roles,
},
ncMeta,

3
packages/nocodb/src/models/User.ts

@ -21,7 +21,6 @@ export default class User implements UserType {
password?: string;
salt?: string;
refresh_token?: string;
invite_token?: string;
invite_token_expires?: number | Date;
reset_password_expires?: number | Date;
@ -51,7 +50,6 @@ export default class User implements UserType {
'email',
'password',
'salt',
'refresh_token',
'invite_token',
'invite_token_expires',
'reset_password_expires',
@ -92,7 +90,6 @@ export default class User implements UserType {
'email',
'password',
'salt',
'refresh_token',
'invite_token',
'invite_token_expires',
'reset_password_expires',

1
packages/nocodb/src/utils/sanitiseUserObj.ts

@ -1,7 +1,6 @@
const ignoreKeys = new Set([
'password',
'salt',
'refresh_token',
'invite_token',
'invite_token_expires',
'reset_password_expires',

Loading…
Cancel
Save