账号常见问题

更新时间:2020-07-28 16:05:58

自有账号

Q:自有账号集成,APP授权登录返回:10000 msg:服务器繁忙,请稍后再试
A:请检查是否为以下几个原因:

  1. APP端未按文档正确初始化并调用账号授权,如APP端正确调用了,日志内会有类似下图的信息打印:

  1. 客户服务端获取AccessToken的url外网不可访问
  2. 客户服务端获取AccessToken的返回字段不符合文档规范
  3. 可能是客户的服务端证书有问题,日志内会有以下信息打印
    login failed  code:10000 msg:SERVER_ERROR,sun.security.validator.ValidatorException: PKIX path 
    building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
    valid certification path to requested target: [0bc1746d15622262046205726e0719]
    
    请参考外网资料解决:https://www.cnblogs.com/liaojie970/p/4919485.html

Q:**自有APP自有账号授权登录,报以下错误 login failed code:10019 msg:Rpc 调用出错,错误信息 400**
报错日志:

12-10 02:38:32.515 18724 18806 D oa_rpc : [] : host = sdk.openaccount.aliyun.com
12-10 02:38:32.516 18724 18806 D TAG : [] : request = {"loginByOauthRequest":{"riskControlInfo":{"appVersionName":"1.0","deviceId":"xxxxab83-aec3-4df4-8ab9-612ff9a97ea3","platformName":"android","routerMac":"01:80:c2:00:00:03","locale":"en_US","USE_OA_PWD_ENCRYPT":"true","utdid":"XA3cuduYvUoDAHFcMqqZi0qB","USE_H5_NC":"true","yunOSId":"","umidToken":"\/7DrXB6pYnCod9KJzeu9IgjXHpGwLcaM","platformVersion":"25","signType":"RSA","appVersion":"1","imei":"000000000000000","sdkVersion":"3.4.2","appID":"com.brc.iot","brand":"Android","netType":"wifi","appAuthToken":"\/7DrXB6pYnCod9KJzeu9IgjXHpGwLcaM","model":"Custom Tablet - 7.1.0 - API 25 - 1536x2048"},"oauthAppKey":"xxxxxxxx","oauthPlateform":23,"authCode":"xxxx24aae609a2aa3ff3978d1dda8c61"}}
12-10 02:38:32.618 18724 18806 D oa_rpc : [] : Rpc error message : null retCode : 400 responseCode : 400
12-10 02:38:32.618 18724 18724 I liye : auth授权登录 失败 code = 10019 message = Rpc 调用出错,错误信息 400


A:三方的服务器时间和阿里云网关的时间,时间相差太大,超过15分钟,需要三方调整为北京时间。

Q:Android自有APP,自有账号授权登录报login failed code:10019 msg:Rpc 调用出错,错误信息 500
日志:

1590112589.362 20837-21122/com.ldrobot.alixiaogou E/oa_rpc: [] : Rpc error message : Read response occur error, retCode : 500, responseCode : 500, xcaError : 
1590112589.363 20837-21122/com.ldrobot.alixiaogou D/RegionManager: RpcResponse{code=10019, subCode=0, traceId='null', message='Rpc 调用出错,错误信息 500', data=null, arrayData=null}
1590112589.365 20837-20837/com.ldrobot.alixiaogou I/OALoginAdapter: login failed  code:10019 msg:Rpc 调用出错,错误信息 500

A:手机网络不稳定,检查下手机网络情况。

内置账号UI自定义常见问题

Android:


Q:安卓使用内置账号登录的,如何修改TitleBar的返回按钮颜色呢?
A:继承的LoginActivity里面代码修改下这里的icon即可 this.mToolBar.setNavigationIcon(com.alibaba.sdk.android.openaccount.ui.R.drawable.openaccountic_actionbar_back);
注册界面RegsiterActivity也是类似的,因为RegsiterActivity也是BaseAppCompatActivity的子类, 继承下RegsiterActivity,主题为Register,然后也同样修改ToolBar的图标。 在LoginActivity里面注册跳转方式为 OpenAccountUIService openAccountUIService = (OpenAccountUIService) OpenAccountSDK.getService(OpenAccountUIService.class); openAccountUIService.showRegister(this,RegisterActivity.class,this.getEmailRegisterCallback());
其他界面也是类似的。


Q:自有APP使用内置账号,如何显示区号?
A:Android:OpenAccountUIConfigs.AccountPasswordLoginFlow._supportForeignMobileNumbers
=true;
OpenAccountUIConfigs.MobileResetPasswordLoginFlow.supportForeignMobileNumbers=true;
IOS:登录界面资源上把区号隐藏属性去掉。

Q:安卓自有APP内置账号注册选择国家地区区号,在不同地区区号会定位到当前区域的区号么?如何实现可以定位到当前国家地区区号?
A: 目前是没有提供这个功能的,需要用户自己实现。注册成功之后会自动登录,登录成功之后可以找到当前登录的mobileLocationCode,((Map)OpenAccountSDK.getService(OpenAccountService.class).
getSession().getOtherInfo().get("openaccount_other_info")).get("mobileLocationCode"),在登录界面可以手动设置mobileLocationCode显示,在LoginActivity界面中手动设置,TextView
textView=(TextView)
this.loginIdEdit.getInputBoxWithClear().findViewById("edt_chosed_country_num");
textView.setText(mobileLocationCode);

IOS:

Q:iOS内置账号如何修改按钮颜色
A:直接使用颜色生成的图片去赋值下即可:
参考代码:
[button setBackgroundImage:[UIImage ims_imageWithColor:UIColor.whiteColor] forState:UIControlStateNormal]; [button setBackgroundImage:[UIImage ims_imageWithColor:UIColor.whiteColor] forState:UIControlStateHighlighted]; [button setBackgroundImage:[UIImage ims_imageWithColor:[UIColor colorWithRed:0 green:106./255. blue:228.0/255. alpha:0.4]] forState:UIControlStateDisabled];

results matching ""

    No results matching ""