OAuth.IO Integration


#1

I am having a really difficult time getting the cordova plugin authored by OAuth.io to work within the phone build. Everything is setup based off of the desktop version of the JS file they provide, wrapped in an Angular service for ease of unit testing, with another factory handling the actual flow of login/logout etc… The issue I am running into is that now after switching to the plugin version, nothing works any longer. I can no longer pull up the facebook login page, nor have the global object ‘OAuth’ recognized outside of the injected service.

Has anyone been able to get this to a working state?


#2

This plugin https://github.com/matteosuppo/angular-oauthio?


#3

No, sorry I didn’t specifiy, the one made by OAuth.io for phonegap/cordova projects -> https://github.com/oauth-io/oauth-phonegap

I didn’t use the plugin you mention as I just wrapped my own service wrapper around the web js library from -> https://github.com/oauth-io/

I assumed that the plugin you mentioned does not work within an Ionic app as it uses the web js file?


#4

Well an ionic app is Html and JS so I don’t see why it wouldn’t work. If it’s just a simple angular wrapper, then it’s definitely possible to use this with ionic. Give it a shot a let me know if it works


#5

Just as with the straight web javascript version of OAuth.IO, the popup function works as expected in the browser session, however as expected it does not work within the phone build, with the same error as using the regular web js version prior to trying the plugin. Screenshot attached.


#6

The screenshot died, could you give more information on the error by any chance?