feat(auth): 小程序登录支持配置化与手机号一键登录自动注册 / Add configurable xcx login with phone auto-registration
- 小程序 appid/密钥支持参数管理 sys.account.xcxApps(JSON 数组,多小程序)优先,yml security.xcx.apps 兜底 - 登录新增 phoneCode 字段,调用微信 getuserphonenumber 解析真实手机号,stable_token 按小程序缓存至 redis - 首次登录自动注册:以授权手机号为账号(已有同手机号账号则直接绑定),写入 sys_social 绑定 openid - 自动注册默认昵称/初始密码(sys.user.initPassword)/头像/性别,用户类型 app_user
This commit is contained in:
+3
-2
@@ -51,12 +51,13 @@ public interface RemoteUserService {
|
||||
LoginUser getUserInfoByEmail(String email) throws UserException;
|
||||
|
||||
/**
|
||||
* 通过openid查询用户信息
|
||||
* 通过openid查询小程序用户信息,用户不存在时自动注册
|
||||
*
|
||||
* @param openid openid
|
||||
* @param phone 手机号一键登录获取的真实手机号,首次登录自动注册时作为账号,可为空
|
||||
* @return 结果
|
||||
*/
|
||||
XcxLoginUser getUserInfoByOpenid(String openid) throws UserException;
|
||||
XcxLoginUser getUserInfoByOpenid(String openid, String phone) throws UserException;
|
||||
|
||||
/**
|
||||
* 注册用户信息
|
||||
|
||||
Reference in New Issue
Block a user