Closed rakeshborole007 closed 4 years ago
This sounds like a potential duplicate of #91 and not an issue with the plugin. See https://github.com/openid/AppAuth-Android/issues/420. You may need to do more configuration. Bear in mind that this plugin is a wrapper for the iOS and Android AppAuth SDKs, so if you run into problems, it's more likely to do with the SDK itself that I would suggest you check their appropriate repositories for more details.
Closing this as is it's not something I can address
I solved it. First changed authorizeAndExchangeCode method to seperate call to authorize and token method. This shows proper error stacktrace.
The error is due to not using https url endpoint of keycloak. So configured server for ssl and used signed certificate.
Downloaded certificate
echo "" | openssl s_client -host phoenixelectricals.in -port 443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > phoenixelectricals.pem
In AndroidManifest.xml added following entry
<application
.....
android:networkSecurityConfig="@xml/network_security_config">
The network_security_config.xml contains following setting
<network-security-config>
<base-config>
<trust-anchors>
<!-- Trust preinstalled CAs -->
<certificates src="system" />
<!-- Additionally trust user added CAs -->
<certificates src="user" />
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">phoenixelectricals.in</domain>
<trust-anchors>
<certificates src="@raw/phoenixelectricals"/>
</trust-anchors>
</domain-config>
<debug-overrides>
<trust-anchors>
<certificates src="@raw/phoenixelectricals"/>
</trust-anchors>
</debug-overrides>
</network-security-config>
The flutter app with keycloak as UAA working with android version 7 but in android 9, 10 after successful login with keycloak app throws error
Following is my code snippet:
Following is error