用户认证
- Source:
Methods
(static) anonymousLogin() → {Promise.<BaaS.CurrentUser>}
匿名登录
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) getCurrentUser() → {Promise.<BaaS.CurrentUser>}
获取当前用户
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) handleUserInfo(options) → {Promise.<any>}
获取用户信息、手机号
Parameters:
Name | Type | Description |
---|---|---|
options |
BaaS.handleUserInfoOptions | 参数 |
- Source:
Returns:
- Type
- Promise.<any>
(static) login(options) → {Promise.<BaaS.CurrentUser>}
登录
Parameters:
Name | Type | Description |
---|---|---|
options |
BaaS.AuthWithUsernameOptions | BaaS.AuthWithEmailOptions | BaaS.AuthWithPhoneOptions |
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) loginWithSmsVerificationCode(mobilePhone, smsCode, optionsopt) → {Promise.<BaaS.CurrentUser>}
使用手机号 + 验证码登录
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mobilePhone |
string | 手机号码 | |
smsCode |
string | 验证码 | |
options |
BaaS.LoginOptions |
<optional> |
可选配置 |
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) loginWithWechat(authDataopt, optionsopt) → {Promise.<BaaS.CurrentUser>}
微信登录
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
authData |
BaaS.AuthData | null |
<optional> |
用户信息,值为 null 时是静默登录 |
options |
BaaS.WechatLoginOptions |
<optional> |
其他选项 |
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) logout() → {Promise.<BaaS.Response.<any>>}
退出登录状态
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.Response.<any>>
(static) register(options) → {Promise.<BaaS.CurrentUser>}
注册
Parameters:
Name | Type | Description |
---|---|---|
options |
BaaS.AuthWithUsernameOptions | BaaS.AuthWithEmailOptions | BaaS.AuthWithPhoneOptions |
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) requestPasswordReset(param) → {Promise.<BaaS.Response.<any>>}
忘记密码,发送重置密码邮件
Parameters:
Name | Type | Description |
---|---|---|
param |
BaaS.PasswordResetParam | 账号信息 |
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.Response.<any>>
(static) silentLogin() → {Promise.<BaaS.CurrentUser>}
静默登录
- Since:
- v2.0.0
- Source:
Returns:
- Type
- Promise.<BaaS.CurrentUser>
(static) silentLogin()
静默登录
- Deprecated:
- since v2.0.0
- Source: