# Advantages of auth0 cordova SDK compared to the old solution

**URL:** <https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856>\
**Category:** Get Help\
**Tags:** cordova, ionic2, auth0\
**Created:** [June 1, 2017, 8:39pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856 "2017-06-01T20:39:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev41](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dev41/32/12814_2.png) [@dev41](https://community.auth0.com/u/dev41)\
**Post date:** [June 1, 2017, 8:39pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/1 "2017-06-01T20:39:14Z")

</div>

I just figured out that there seems to be a new recomended way to integrate Auth0 into Ionic2+.  
I’m just wondering if there is any significant advantage of the new solution?

I just made a quick test implementation in my app, and despide the fact that it didn’t save the token properly (I wasn’t able to figure it out, but I also didn’t spent much time debugging), I saw at few disadvantages right away:

- not able to test it in the browser anymore (via `ionic serve -l`) which is mutch easier to debug
- the addressbar is always visible and there doesn’t seem to be a way to get rid of it - so the look and feel of the integration is quite poor

Just to let you know which integration I currently use, here is my reference:

> **[Ionic 2 and Auth0](https://ionic.io/blog/ionic-2-and-auth0)**
>
> TL;DR: Implementing modern authentication and identity can be tricky. Fortunately, Auth0 makes it really easy to get up and running quickly and without any friction. With Auth0 you can use any social identity provider and have features like...

The new soltion:  
[https://auth0.com/docs/quickstart/native/ionic2/01-login](https://auth0.com/docs/quickstart/native/ionic2/01-login)

Also the documentation is missing the AuthHttp documentation - but as it uses the auth0-js lib I guess it’s still working the same way.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [June 2, 2017, 5:59pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/2 "2017-06-02T17:59:18Z")

</div>

The `auth0-cordova` library performs a PKCE exchange which gives you improved security from the perspective that it mitigates the threat of authorization code interception. Using authorization code grant instead of an implicit grant would already be an improvement as the tokens are delivered through the token endpoint and not directly on a URL, but PKCE goes even further.

It also does not make use of in-app browser which would mean the use of WebViews. You may not like the address bar, but to the end-use makes it easier and safer to input credentials in the OS browser that in a WebView. For example, Google simply disallowed user authentication happening on WebViews so this is another added benefit.

---

<div class="post-metadata">

**Author:** ![dev41](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dev41/32/12814_2.png) [@dev41](https://community.auth0.com/u/dev41)\
**Post date:** [June 2, 2017, 8:34pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/3 "2017-06-02T20:34:48Z")

</div>

Thx for the answer.  
What I can’t see from the current documentation: how about refreshing tokens? And is there support for custom integrated forms too (without any webview or browser)?

---

<div class="post-metadata">

**Author:** ![Martin\_EF\_Power](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Martin\_EF\_Power](https://community.auth0.com/u/Martin_EF_Power)\
**Post date:** [January 11, 2018, 9:15pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/4 "2018-01-11T21:15:34Z")

</div>

@jmangelo Ive also implemented the Cordova quickstart which uses the PKCE exchange and I was wondering, is there no way around being able to run the code in a browser? Perhaps there are options to switch out authentication methods before production release?

---

<div class="post-metadata">

**Author:** ![Martin\_EF\_Power](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Martin\_EF\_Power](https://community.auth0.com/u/Martin_EF_Power)\
**Post date:** [January 11, 2018, 9:15pm UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/5 "2018-01-11T21:15:34Z")

</div>

@jmangelo Ive also implemented the Cordova quickstart which uses the PKCE exchange and I was wondering, is there no way around being able to run the code in a browser? Perhaps there are options to switch out authentication methods before production release?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [January 17, 2018, 12:02am UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/6 "2018-01-17T00:02:39Z")

</div>

In theory, it could be possible to do something like platform detection and run different flows depending on platform, but there’s no built-in support for that at the library level as far as I’m aware and it also goes beyond my knowledge of Cordova.

---

<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:54am UTC](https://community.auth0.com/t/advantages-of-auth0-cordova-sdk-compared-to-the-old-solution/6856/7 "2018-03-02T05:54:18Z")

</div>


