File tree Expand file tree Collapse file tree
packages/openops/src/lib/openops-tables Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ServerContext } from '@openops/blocks-framework' ;
2- import {
3- AppSystemProp ,
4- encryptUtils ,
5- QueueMode ,
6- system ,
7- } from '@openops/server-shared' ;
2+ import { AppSystemProp , encryptUtils , system } from '@openops/server-shared' ;
83import { authenticateDefaultUserInOpenOpsTables } from './auth-user' ;
94
105export function shouldUseDatabaseToken ( ) : boolean {
@@ -30,17 +25,6 @@ export async function resolveTokenProvider(
3025 serverContext : TablesServerContext ,
3126) : Promise < TokenOrContext > {
3227 if ( shouldUseDatabaseToken ( ) ) {
33- // Ensure encryption key is loaded before returning the lazy getToken function
34- try {
35- const queueMode = system . get < QueueMode > ( AppSystemProp . QUEUE_MODE ) ;
36- if ( queueMode ) {
37- await encryptUtils . loadEncryptionKey ( queueMode ) ;
38- }
39- } catch ( error ) {
40- // If loading fails, we'll let decryptString handle the error
41- // This ensures we don't break if the key is already loaded
42- }
43-
4428 return {
4529 getToken : ( ) => {
4630 const { tablesDatabaseToken } = serverContext ;
You can’t perform that action at this time.
0 commit comments