# Use of AppAuth-iOS with Keycloak

**URL:** <https://forum.keycloak.org/t/use-of-appauth-ios-with-keycloak/24021>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [January 10, 2024, 3:39pm UTC](https://forum.keycloak.org/t/use-of-appauth-ios-with-keycloak/24021 "2024-01-10T15:39:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![supriya-narayan](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/supriya-narayan/32/9551_2.png) [@supriya-narayan](https://forum.keycloak.org/u/supriya-narayan)\
**Post date:** [January 10, 2024, 3:39pm UTC](https://forum.keycloak.org/t/use-of-appauth-ios-with-keycloak/24021/1 "2024-01-10T15:39:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Prashantkhare07](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/prashantkhare07/32/11402_2.png) [@Prashantkhare07](https://forum.keycloak.org/u/Prashantkhare07)\
**Post date:** [October 9, 2024, 6:44am UTC](https://forum.keycloak.org/t/use-of-appauth-ios-with-keycloak/24021/2 "2024-10-09T06:44:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![embesozzi](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/embesozzi/32/12390_2.png) [@embesozzi](https://forum.keycloak.org/u/embesozzi)\
**Post date:** [October 11, 2024, 12:02pm UTC](https://forum.keycloak.org/t/use-of-appauth-ios-with-keycloak/24021/3 "2024-10-11T12:02:40Z")

</div>

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](https://tools.ietf.org/html/rfc8252)
