Skip to main content

Changelog

[3.7.1] 2026-08-03

  • [Fixed] Auth event deduplication: SIGNED_IN/SIGNED_OUT are now managed uniformly by oauth2client to avoid duplicate triggering
  • [Fixed] The SIGNED_IN callback did not carry user information on first login
  • [Fixed] SIGNED_IN was incorrectly triggered when switching back to the tab after signing out
  • [Changed] OAuth getCredentials now always uses storage as the source of truth, with new BroadcastChannel/visibilitychange cross-tab synchronization

[3.7.0] 2026-07-30

  • [Changed] Engineering: the monorepo has been migrated to Yarn 2 (Berry 4.18.0), and internal package dependencies now use the workspace:* protocol, which is automatically resolved to specific versions at publish time
  • [Changed] The release process has been switched to Lerna independent versioning mode, supporting incremental publishing per package (changes to @cloudbase/oauth automatically trigger the release of @cloudbase/auth and @cloudbase/js-sdk); all sub-packages are now public and can be published individually
  • [Fixed] Removed leftover debug console.log statements in @cloudbase/oauth (the CloudbaseOAuth constructor) and @cloudbase/mysql (getEntity)
  • [Fixed] Added missing getSecretInfo-related type assertions in the @cloudbase/app Node.js adapter

[3.6.7] 2026-07-30

  • [Changed] Auth module: the usage value of the verification code API getVerification is now consistently narrowed to the VerificationUsage enum (EMAIL / RECOVERY / REAUTHENTICATION). Scenarios such as signUp, signInWithOtp, resetPasswordForEmail, updateUser, reauthenticate, and resend no longer use string literals, preventing incorrect values from being passed
  • [Changed] @cloudbase/oauth now additionally exports the VerificationUsage enum
  • [Changed] The type of the internal data.usage field in resend has been narrowed from string to VerificationUsage

[3.6.5] 2026-07-28

  • [Fixed] Fundamentally resolved the Module not found: Can't resolve 'xxx' errors caused by optional Node.js dependencies (jsonwebtoken, @cloudbase/signature-nodejs, ws) when consumers bundle for the browser or SSR (Next.js, Nuxt, etc.): these dependencies are now loaded on demand at runtime by an internal optionalRequire, where the module name is assembled from fragments at runtime and require is obtained from the host runtime, so bundlers cannot recognize them during static analysis and therefore will not try to resolve them. Consumers no longer need to configure serverExternalPackages in next.config.js or add webpack fallbacks
  • [Changed] The wsClass of the Node.js adapter has been changed to a lazily-loaded getter: ws is loaded only when realtime capabilities (realtime / database) actually access this property, so Node.js scenarios that do not use realtime capabilities will not load ws; a duplicate-guard flag has also been added to avoid repeatedly executing the load and repeatedly printing the installation hint when ws is not installed

[3.6.4] 2026-07-24

  • [Fixed] Fixed an issue where the private key passed by users via init({ env, auth: { credentials } }) could not be read by createTicket in custom login scenarios: getSecretInfo() previously only read from the top-level config.credentials, and now supports both config.auth.credentials (js-sdk style) and top-level credentials (node-sdk style)
  • [Fixed] Fixed an issue where dealNodeAdapterConfig() overwrote config.auth.credentials with an empty value when backfilling; it now preserves the credentials explicitly passed by the user, and corrects its fallback value type (an ICredentialsInfo object, undefined when there is no valid value, no longer an empty string)

[3.6.3] 2026-07-17

  • [Changed] timeout default value now varies by runtime environment: Node.js environments (Cloud Functions/CloudBase Run/self-hosted servers) default to no timeout (unlimited) to accommodate long-running server-side requests; Web and other non-Node.js environments still default to 15000ms. Explicitly passing timeout takes precedence
  • [Changed] NodeRequest no longer applies timeout interruption when timeout is not set (download and createAbortController enable timeout on demand), only enabled when timeout is explicitly passed
  • [Changed] Auth updateUser no longer supports password changes: passing password / new_password parameters will throw an error. Use resetPasswordForOld (change with old password), resetPasswordForEmail (reset via verification code), or reauthenticate (change after re-authentication) instead
  • [Changed] UpdateUserReq type removes password / new_password fields from base request (marked as never)

[3.6.2] 2026-06-29

  • [Fixed] In getSecretInfo(), when using top-level secretId/secretKey, sessionToken was incorrectly read from environment variable TENCENTCLOUD_SESSIONTOKEN, corrected to read from top-level sessionToken field in config
  • [Fixed] In getSecretInfo(), when using config.auth, sessionToken was incorrectly read from environment variable, corrected to read from config.auth.sessionToken
  • [Fixed] NodeRequest V3 signing now correctly resolves secretId/secretKey/sessionToken from both top-level config and config.auth (config.auth takes higher priority)

[3.6.1] 2026-06-29

  • [Fixed] AI module: prioritize native Web Streams API (Node.js >= 18 / modern browsers) to avoid compatibility issues with web-streams-polyfill in higher version environments
  • [Fixed] Browser-side webpack build adds resolve.fallback: { crypto: false } to avoid importing Node.js crypto module polyfill
  • [Changed] @cloudbase/database dependency bson version downgraded from ^7.1.1 to ^6.10.3
  • [Changed] @cloudbase/mysql and database typescript devDependency upgraded to ^5.0.0
  • [Changed] @cloudbase/mysql tsconfig.esm.json adds moduleResolution: "node"

[3.6.0] 2026-06-29

  • [Fixed] Fixed the issue where webpack.DefinePlugin replaces process.env entirely with a static object during Node.js server build, causing runtime inability to read environment variables such as TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, SCF_NAMESPACE
  • [Fixed] getSecretInfo() now reads from getCloudbaseContext() uniformly (instead of directly from getEnv()), ensuring correct priority of environment variables in context
  • [Fixed] getCloudbaseContext() adds collection of CLOUDBASE_APIKEY environment variable
  • [Fixed] AI module: in Node.js adapter non-streaming scenarios, when responseData is already a JSON object, skip ReadableStream parsing and return the result directly

[3.5.4] 2026-06-25

  • [Fixed] Fixed the issue where getWxDefaultAdapter returns an empty object during initialization in Node.js ESM environment, causing useAdapters to throw TypeError: i is not a function when calling isMatch()
  • [Fixed] Fixed the issue where document database collection query in GATEWAY mode fails because backend response lacks the list field, causing formatResDocumentData to throw TypeError: Cannot read properties of undefined (reading 'map')

[3.5.3] 2026-06-25

  • [Added] App instance adds registerHost(host, protocol?) method to set all endpoints (CLOUD_API / GATEWAY) at once, only requires the host address and automatically appends paths
  • [Added] cloudbase.app.App type declaration adds registerHost, getEndPointWithKey, registerEndPoint, registerEndPointWithKey, parseCaptcha instance methods
  • [Added] ai(options?) supports passing baseUrl parameter to customize AI service URL
  • [Fixed] AI module supports endpoint dynamic changes after registerEndPointWithKey (aiBaseUrl / aiBotBaseUrl changed to dynamic getters)
  • [Fixed] MySQL/RDB module supports endpoint dynamic changes, new requests automatically use the latest GATEWAY address after registerEndPointWithKey
  • [Fixed] Auth/OAuth module supports endpoint dynamic changes, authentication requests automatically follow the latest apiOrigin after registerEndPointWithKey

[3.5.2] 2026-06-24

  • [Fixed] Fixed the issue where CloudbaseRequest.fetch fails due to missing oauthInstance in Node.js server-side (secretId/secretKey authentication) scenario, enabling modules like RDB to correctly obtain access_token automatically through the underlying NodeRequest V3 signature

[3.5.1] 2026-06-23

  • [Added] Auth module adds AuthErrorCode numeric error code enum and AuthError.errorCode, retryAfter properties
  • [Added] AuthErrorCategory adds RATE_LIMITED, CAPTCHA_REQUIRED, CAPTCHA_INVALID, MFA_REQUIRED, PRECONDITION_FAILED, VERIFICATION_FAILED categories
  • [Fixed] Auth updateUser correctly returns error when verifyOtp verification fails; only triggers USER_UPDATED event when actual modifications are made
  • [Fixed] OTP sending adds target: 'USER' parameter; fixes abort listener leak and error-tolerant parsing of non-JSON response bodies

[3.5.0] 2026-06-23

  • [Added] Storage module adds Neo environment object storage capability, app.storage.from(bucketId) returns a new object storage client (upload/download/delete/move/copy/signed URL, etc.)
  • [Added] app.storage adds Bucket management APIs: listBuckets / getBucket / createBucket / updateBucket / deleteBucket
  • [Changed] app.storage.from() without arguments still returns ClassicStorageFileApi (behavior unchanged); passing bucketId returns the Neo object storage client
  • [Deprecated] Legacy top-level cloud storage APIs (uploadFile / downloadFile / deleteFile, etc.) are marked as deprecated, recommend using the new app.storage.from(bucketId) API instead

[3.4.8] 2026-06-16

  • [Fixed] Fixed getUser and getSession to consistently return null for user when there are no credentials or in accessKey mode

[3.4.7] 2026-06-16

  • [Fixed] Auth module verifyOtp token parameter now supports both number and string types

[3.4.6] 2026-06-12

  • [Refactor] Refactored Node.js adapter layer, consolidated WeChat CloudBase request logic (callWxOpenApi / callWxPayApi / callCompatibleWxOpenApi / wxCallContainerApi)
  • [Fixed] Fixed WeChat CloudBase form-data request response format inconsistency with legacy version, correctly returns Buffer type response
  • [Changed] Added responseType: 'buffer' support to request module for binary response scenarios

[3.4.5] 2026-06-10

  • [Fixed] Set duplex: 'half' when server-side body is a stream

[3.4.4] 2026-06-10

  • [Fixed] Added bson dependency for server-side

[3.4.3] 2026-06-10

  • [Fixed] Fixed window is not defined error when calling downloadFile in Node.js environment

[3.4.2] 2026-06-10

  • [Fixed] Fixed bundledDependencies sub-package version number causing yarn install to fail when looking up from registry

[3.4.1] 2026-06-10

  • [Fixed] Fixed database module document query related issues

[3.4.0] 2026-06-09

  • [Changed] Removed analytics module, no longer published with the main package
  • [Changed] Sub-modules are now published together with the main package, no longer with separate version updates
  • [Added] Support sub-path exports for on-demand imports (e.g., @cloudbase/js-sdk/auth)

[3.3.13] 2026-05-29

  • [Fixed] Fixed cloud function related issues

[3.3.12] 2026-05-28

  • [Fixed] Adapted to v1/user/me API response field changes, hasPassword now uses password === 'SET' for judgment

[3.3.11] 2026-05-26

  • [Fixed] Fixed the issue where accessing scope property throws error when credentials is empty in _getCredentials

[3.3.10] 2026-05-19

  • [Changed] Fetch requests support withCredentials parameter to control whether to carry authentication information

[3.3.9] 2026-05-08

  • [Changed] endPointMode default value updated to GATEWAY

[3.3.8] 2026-05-07

  • [Added] getUser supports matching the open_id corresponding to the current Mini Program appId from providers

[3.3.7] 2026-05-06

  • [Fixed] getUser returns user info with open_id field support

[3.3.6] 2026-04-30

  • [Added] Document database supports batch data insertion

[3.3.5] 2026-04-29

  • [Added] Added type definitions

[3.3.4] 2026-04-21

  • [Added] Database where conditions support transactions

[3.3.3] 2026-04-17

  • [Fixed] signUp fixed formatting error when phone_number is empty

[3.3.2] 2026-04-13

  • [Changed] getUser/getCurrentUser supports isRefresh parameter to control whether to fetch the latest user information via API request, defaults to fetching latest data each time

[3.3.1] 2026-04-13

  • [Added] getUser supports optional cache reading or API data fetching

[3.3.0] 2026-04-08

  • [Added] Database supports HTTP API

[3.2.2] 2026-04-02

  • [Added] signInWithOtp supports emailRedirectTo

[3.2.1] 2026-03-24

  • [Added] Added help information

[3.2.0] 2026-03-23

  • [Added] Mini Program phone number authorization supports service provider type Mini Programs

[3.1.12] 2026-03-16

  • [Fixed] Added envName to request parameters in Node.js mode

[3.1.11] 2026-03-16

  • [Fixed] v3 signature compatible with empty headers in Node.js mode

[3.1.9] 2026-03-13

  • [Added] Enhanced type declarations and error messages

[3.1.8] 2026-03-12

  • [Fixed] Added storage type definitions

[3.1.7] 2026-03-12

  • [Fixed] getVerification added phone_number parameter formatting

[3.1.6] 2026-03-12

  • [Added] signInWithOtp added optional parameter options.shouldCreateUser to control automatic user registration

[3.1.5] 2026-03-11

  • [Changed] Improved database type definitions
  • [Added] Added requestId in error responses

[3.1.4] 2026-03-11

  • [Fixed] verifyOAuth returns preset redirect URL

[3.1.3] 2026-03-10

  • [Fixed] verifyOAuth refresh hash address issue

[3.1.2] 2026-03-06

  • [Fixed] Fix HBuilderX unable to find SourceMap issue

[3.1.1] 2026-03-03

  • [Changed] Update WeChat Mini Program adapter

[3.1.0] 2026-03-03

  • [Fixed] Compatible with multiple platforms

[3.0.6] 2026-03-03

  • [Fixed] Fix Node.js signature issue

[3.0.5] 2026-03-01

  • [Added] Support SecretId and SecretKey for Node.js

[3.0.4] 2026-02-27

  • [Added] Support Node.js

[3.0.3] 2026-02-26

  • [Fixed] Fix user information nickName retrieval issue

[3.0.2] 2026-02-12

  • [Fixed] Fix user information role retrieval issue

[3.0.0] 2026-02-10

  • [Changed] endPointMode defaults to GATEWAY mode

[2.28.4] 2026-05-06

  • [Fixed] getUser returns user info with open_id field support

[2.28.3] 2026-04-30

  • [Added] Document database supports batch data insertion

[2.28.2] 2026-04-29

  • [Added] Type definitions

[2.28.1] 2026-04-23

  • [Added] Overseas support

[2.27.5] 2026-04-21

  • [Added] Database where conditions support transactions

[2.27.4] 2026-04-17

  • [Fixed] signUp fixed formatting error when phone_number is empty

[2.27.3] 2026-04-13

  • [Added] getUser supports optional cache reading or API data fetching

[2.27.2] 2026-04-02

  • [Added] signInWithOtp supports emailRedirectTo

[2.27.1] 2026-03-24

  • [Added] Added help information

[2.27.0] 2026-03-23

  • [Added] Mini Program phone number authorization supports service provider type Mini Programs.

[2.26.2] 2026-03-13

  • [Added] Enhanced type declaration and error prompts

[2.26.1] 2026-03-12

  • [Fixed] getVerification added phone_number parameter formatting

[2.26.0] 2026-03-12

  • [Added] signInWithOtp added optional parameter options.shouldCreateUser to control automatic user registration

[2.25.11] 2026-03-11

  • [Fixed] verifyOAuth returns preset redirect URL

[2.25.10] 2026-03-10

  • [Fixed] verifyOAuth refresh hash address issue

[2.25.9] 2026-03-06

  • [Fixed] Fix HBuilderX unable to find SourceMap issue

[2.25.8] 2026-03-03

  • [Changed] Update WeChat Mini Program adapter

[2.25.5] 2026-02-04

  • [Fixed] Fix user information role retrieval issue

[2.25.4] 2026-02-04

  • [Added] encryptlong compatible with multiple platforms

[2.25.3] 2026-01-28

  • [Fixed] Set request body to empty for GET/HEAD requests
  • [Fixed] auth.wsWebSign action always uses tcb api request

[2.25.2] 2026-01-26

  • [Added] New version auth api launched

[2.25.1] 2026-01-22

  • [Added] Update database dependency version

[2.25.0] 2026-01-22

  • [Changed] Build CI release, Node.js version upgrade to 22, code optimization

[2.24.10] 2026‑01‑14

  • [Changed] Update getDeviceInfo and error handling

[2.24.9] 2026‑01‑13

  • [Changed] Update database dependency to 0.10.0, multi-authentication support, clean build files

[2.24.8] 2026‑01‑12

  • [Added] Add Hunyuan AR image model support

[2.24.7 and earlier versions] 2025-12-29 to 2026-01-12

  • Omitted

[1.4.1] 2021-03-08

  • [Fixed] Fix file upload progress retrieval bug

[1.4.0] 2020-12-16

  • [Added] Add analytics API

[1.3.3] 2020-09-25

  • [Changed] Optimize TypeScript syntax hints
  • [Fixed] Fix database call error when not logged in

[1.3.2] 2020-09-24

  • [Fixed] Retrieve plugin AppId for appSign in WeChat Mini Program plugin environment
  • [Fixed] Throw error when writing to full storage

[1.3.1] 2020-09-23

  • [Fixed] Compatible with WeChat Mini Program plugin environment

[1.3.0] 2020-09-11

  • [Changed] Database real-time push feature separated into an independent module

[1.2.5] 2020-09-07

  • [Fixed] Fix errors in WeChat Mini Program real device environment

[1.2.3] 2020-09-03

  • [Changed] Optimize API syntax hints

[1.2.2] 2020-09-01

  • [Changed] Optimize error messages in development environment

[1.2.1] 2020-08-26

  • [Added] Add Auth.getAuthHeaderAsync API

[1.1.4] 2020-08-25

  • [Fixed] Fix WeChat Official Account login bug
  • [Fixed] Fix WeChat Mini Program file upload bug

[1.1.2] 2020-08-24

  • [Fixed] Fix the issue where Mini Programs cannot directly reference npm packages

[1.1.1] 2020-08-19

  • [Fixed] Fix username and password login bug

[1.1.0] 2020-08-18

  • [Added] Add cloudbase.registerSdkName API

[1.0.4] 2020-08-13

  • [Fixed] Fix real-time push multi-environment confusion issue

[1.0.3] 2020-08-11

  • [Fixed] Fix oversized bundle issue caused by Crypto-JS

[1.0.2] 2020-08-10

  • [Changed] Optimize version statistics

[1.0.1] 2020-08-05

  • [Fixed] Storage.downloadFile can directly download files to local

[1.0.0] 2020-07-31

  • [Added] Release version 1.0.0. The legacy SDK tcb-js-sdk will no longer add new features