Skip to main content

cloudbase js sdk version migration

v2 to v3 migration​

v3 is fully compatible with v2 in code usage and allows smooth migration, but note the following adjustments:

Relationship with login authentication

v1 to v2 migration​

Login authentication​

From v1 to v2, the login authentication module has the following adjustments:

-Login status persistence: Login status supports only local mode. -v2 no longer supports listening to user login status changes -v2 no longer supports WeChat Official Account login method. If you need to use this method, use v1 version. -Streamlined user field info. See User for details. -The account association usage method has been adjusted and no longer supports custom login association. For details, see "Authentication v2 | Account Association" -The login method has been adjusted. For details, see "Login Authentication v2 | Login Authentication".

API adjustment​

Auth​

Update​

-API name typo fix: Auth.getCurrenUser() is no longer in use, please use Auth.getCurrentUser().

New feature​
Deprecated​
  • Auth.anonymousAuthProvider
  • Auth.customAuthProvider
  • Auth.forceResetPwdByPhoneCode
  • Auth.getAuthHeader
  • Auth.getAuthHeaderAsync
  • Auth.onAccessTokenRefreshed
  • Auth.onAnonymousConverted
  • Auth.onLoginStateExpired
  • Auth.onLoginTypeChanged
  • Auth.sendPasswordResetEmail
  • Auth.sendPhoneCode
  • Auth.shouldRefreshAccessToken
  • Auth.signInWithEmailAndPassword
  • Auth.signInWithPhoneCodeOrPassword
  • Auth.signInWithUsernameAndPassword
  • Auth.signUpWithEmailAndPassword
  • Auth.signUpWithPhoneCode
  • Auth.weixinAuthProvider

LoginState​

Deprecated​
  • LoginState.isAnonymousAuth
  • LoginState.isCustomAuth
  • LoginState.isUsernameAuth
  • LoginState.isWeixinAuth
  • LoginState.loginType

User​

Deprecated​
  • User.avatarUrl
  • User.linkWithPhoneNumber
  • User.nickName
  • User.updateEmail
  • User.updatePassword
  • User.updatePhoneNumber
  • User.updateUsername