Member Junction
    Preparing search index...

    Function initializeDriverWithAccountCredentials

    • Initializes a storage driver using account-based credentials from the Credential Engine. This is the enterprise model where credentials are stored in the Credential entity and decrypted at runtime.

      For providers that issue new refresh tokens on each token refresh (like Box.com), this function automatically configures a callback to persist the new tokens back to the Credential entity in the database.

      Parameters

      Returns Promise<FileStorageBase>

      A promise resolving to an initialized FileStorageBase driver

      const driver = await initializeDriverWithAccountCredentials({
      accountEntity,
      providerEntity,
      contextUser
      });

      // Driver is now ready to use
      const objects = await driver.ListObjects('/');