用户认证
- 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) 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) loginWithAlipay(optionsopt) → {Promise.<BaaS.CurrentUser>}
支付宝登录
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
BaaS.LoginWithAlipayParams |
<optional> |
登录参数 |
- 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) 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>