Use of AppAuth-iOS with Keycloak

Hi,

We are using AppAuth-iOS for authentication using Keycloak. There is an issue that we are facing in getting Auth callback from the webview.
When we try to authenticate the user, webview is launched and keycloak login page is presented.
On login, flow continues on the webapp and does not return the callback to the app with the access token.
However, on cancel click on webview, callback is triggered on the app with the error ( Authorization error: The operation couldn’t be completed. (org.openid.appauth.general error -3.).

Any help/suggestions is much appreciated.

Thanks

1 Like

Hi Supriya, have you got any solution for this issue ? Actually I am facing this same issue in Android.

First of all, for App Auth that follows and implements OAuth BCPs [1], you must not use a web view, as it is neither supported nor recommended due to security reasons. Instead, you should use a browser or custom tabs.

[1] RFC 8252 - OAuth 2.0 for Native Apps