AppAuth-Ionic icon indicating copy to clipboard operation
AppAuth-Ionic copied to clipboard

Capacitor Integration

Open WhatsThatItsPat opened this issue 7 years ago • 2 comments

Have you looked into Capacitor while considering this project? In particular, there are two APIs you might want to look at.

  • App, which allows you to addListener to the appUrlOpen event, which will replace (<any>window).handleOpenURL.
  • Browser, which will replace cordova-plugin-browsertab.

Creating a Capacitor plugin could also be considered. Perhaps AppAuth-iOS and AppAuth-Android SDKs could both be leveraged in this scenario as in React Native App Auth.

WhatsThatItsPat avatar Jul 25 '18 20:07 WhatsThatItsPat

Capacitor does state that it only uses safaribrowser controller when on IOS, we kind of want it to inappbrowser when there is absolutely no other choice as it is no longer recommended as a solution for OAuth guidelines.

I have been tinkering around with a cordova plugin for Appauth using the native IOS and Android but it is a long way off at this point.

wi3land avatar Jul 26 '18 08:07 wi3land

Capacitor doesn't preclude the use of Cordova, so InAppBrowser could probably still be used. For my use case, I don't mind requiring users to have iOS9 / SafariViewController without the fallback to InAppBrowser.

Since Capacitor seems to be the future of Ionic, I would think it to be the best way forward. The Capacitor documents lead me to believe it's an easier development path than Cordova as well.

Perhaps @mlynch can offer some insight?

WhatsThatItsPat avatar Jul 26 '18 13:07 WhatsThatItsPat