# Auth0-cordova won't login on iOS with WKWebView/Ionic

**URL:** <https://community.auth0.com/t/auth0-cordova-wont-login-on-ios-with-wkwebview-ionic/8377>\
**Category:** Get Help\
**Tags:** cordova, ionic2, ios\
**Created:** [October 3, 2017, 8:30pm UTC](https://community.auth0.com/t/auth0-cordova-wont-login-on-ios-with-wkwebview-ionic/8377 "2017-10-03T20:30:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saschwarz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saschwarz/32/10625_2.png) [@saschwarz](https://community.auth0.com/u/saschwarz)\
**Post date:** [October 3, 2017, 8:30pm UTC](https://community.auth0.com/t/auth0-cordova-wont-login-on-ios-with-wkwebview-ionic/8377/1 "2017-10-03T20:30:47Z")

</div>

WKWebView is the preferred cordova plugin for use in Cordova and Ionic hybrid applications on iOS. But Auth0’s recommended solution for cordova/hybrid applications, auth0-cordova, doesn’t work WKWebView. This ticket was opened in May and it looks like the problem has been identified:

> <https://github.com/auth0/auth0-cordova/issues/42>
>
> Using this is a recent Ionic(3+) project, I came to notice that the plugin did n…ot route the success callback or dismiss the \`SafariViewController\` after I added the "official" Ionic WKWebView plugin. This may be due to the fact there there is a local webserver being used to serve files and the \`file://\` protocol is "not allowed" (though I have gotten it to work on iOS 10). I would say that it might be a CORS issue, since Auth0 domains likely have restrictions. 
> 
> The Auth0 console shows a successful login, but the view does not move past \`accounts.google.com/\`...
> 
> !\[screen shot 2017-05-30 at 1 58 21 pm\](https://cloud.githubusercontent.com/assets/10172541/26597705/d7a7a918-4540-11e7-8274-5286f88d4b5f.png)
> !\[img\_0020\](https://cloud.githubusercontent.com/assets/10172541/26597704/d7a53278-4540-11e7-9df7-361bcc14c6e8.PNG)

I’m hoping someone from Auth0 can work with Max from Ionic to get this resolved. Ionic has stated that future iOS dev will focus on using WKWebView.

---

<div class="post-metadata">

**Author:** ![ben.daenen](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ben.daenen](https://community.auth0.com/u/ben.daenen)\
**Post date:** [October 18, 2017, 3:55pm UTC](https://community.auth0.com/t/auth0-cordova-wont-login-on-ios-with-wkwebview-ionic/8377/2 "2017-10-18T15:55:16Z")

</div>

I think I am experiencing the same problem.  
After login on auth0 login page, I get redirected with error:  
_‘Getting error:  
Error: Request has been terminated  
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being uploaded, etc.’_

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/auth0-cordova-wont-login-on-ios-with-wkwebview-ionic/8377/3 "2018-03-02T05:56:48Z")

</div>


