From c7d6915068235642d96bba0cba018a4ab1f5dd49 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 2 Apr 2024 12:10:44 +0000 Subject: [PATCH] refactor: remove refresh token from user table --- packages/nocodb/src/helpers/initAdminFromEnv.ts | 2 -- packages/nocodb/src/models/User.ts | 3 --- packages/nocodb/src/utils/sanitiseUserObj.ts | 1 - 3 files changed, 6 deletions(-) diff --git a/packages/nocodb/src/helpers/initAdminFromEnv.ts b/packages/nocodb/src/helpers/initAdminFromEnv.ts index 89b69e55a0..d627a99bcb 100644 --- a/packages/nocodb/src/helpers/initAdminFromEnv.ts +++ b/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, diff --git a/packages/nocodb/src/models/User.ts b/packages/nocodb/src/models/User.ts index be336424e3..2c29647021 100644 --- a/packages/nocodb/src/models/User.ts +++ b/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', diff --git a/packages/nocodb/src/utils/sanitiseUserObj.ts b/packages/nocodb/src/utils/sanitiseUserObj.ts index 01acdb2235..0ef1edcff6 100644 --- a/packages/nocodb/src/utils/sanitiseUserObj.ts +++ b/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',