问题描述
我正在一个Android项目中工作,我必须实现Auth2,并且我使用https://github.com/openid/AppAuth-Android。
我的重定向URI类似于“ xyz:// oauth2redirect”
根据文档,我已在3个地方添加了该内容。
-
在我的
activity
中添加了val authRequestBuilder = AuthorizationRequest.Builder( serviceConfig, MY_CLIENT_ID, ResponseTypeValues.CODE, “ xyz:// oauth2redirect” )
-
在
build.gradle
内的应用程序级别android -> defaultConfig
中添加了defaultConfig { android.defaultConfig.manifestPlaceholders = [ 'appAuthRedirectScheme': 'xyz://oauth2redirect' ]
}
-
活动清单文件中的
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="oauth2redirect" android:scheme="xyz" /> </intent-filter>
仍然成功进行身份验证/登录,网页/ chrome自定义标签未关闭。
请让我知道这里出了什么问题或我做错了什么。 任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)