Skip to main content

Migration from cloudbase js sdk v1

Login Authentication

From v1 to v2, the Login Authentication module has the following changes:

  • Login State Persistence: The login state only supports the local mode.
  • v2 version no longer supports monitoring changes in user login status.
  • v2 version no longer supports Official Account login. If you need to use this method, please use the v1 version
  • Simplified user field information. See User for details.
  • Adjusted the account linking usage and no longer supports custom login association. For details, see Login Authentication v2 | Account Linking
  • Adjusted the login usage. For details, see Login Authentication v2 | Login Authentication

Interface Changes

Auth

Updates
Additions
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