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

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

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

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

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

Loading…
Cancel
Save