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:
- Identity verification, SCF, cloud storage request domain is changed to: {env}.api.tcloudbasegateway.com, aligning with the HTTP API.
- For the cloud storage migration guide, see the cloud storage migration document. -v3 optimizes the identity verification module, bringing more convenient API invocation operations. The new method is recommended. For usage, see Identity Verification.
- SCF, cloud storage domain name changes will involve pre open APIs permission validation. Visit Cloud Development Platform/Identity Verification/Permission Control to perform role association. For details, refer to Policy Management.

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
- Auth.bindEmail
- Auth.bindPhoneNumber
- Auth.bindWithProvider
- Auth.deleteMe
- Auth.genProviderRedirectUri
- Auth.getAccessToken
- Auth.getProviders
- Auth.getUserInfo
- Auth.getVerification
- Auth.grantProviderToken
- Auth.loginScope
- Auth.queryUser
- Auth.resetPassword
- Auth.setCustomSignFunc
- Auth.setPassword
- Auth.signIn
- Auth.signInAnonymously
- Auth.signInWithCustomTicket
- Auth.signInWithOpenId
- Auth.signInWithPhoneAuth
- Auth.signInWithProvider
- Auth.signInWithSms
- Auth.signInWithEmail
- Auth.signInWithUnionId
- Auth.signUp
- Auth.sudo
- Auth.unbindProvider
- Auth.verify
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