oauth-io / oauth-phonegap

OAuth.io plugin for Apache Cordova/PhoneGap
195 stars 69 forks source link

Can't find variable: OAuth #32

Open anuragd opened 10 years ago

anuragd commented 10 years ago

No matter what I try I get this error while trying the phonegap plugin. When I use the js version, I get an error saying Cannot find hostname in file:/// from static It was working before. I can't figure what could have caused this.

william26 commented 10 years ago

Hi,

Thanks for your feedback. Have you tried removing the plugin and reinstalling it?

$ phonegap plugin add https://github.com/oauth-io/oauth-phonegap.git

Could you also give us your code using OAuth.io?

The JavaScript SDK can not be used in a Phonegap environment, as several things differ from browsers.

imabuddha commented 10 years ago

I have the same exact problem. I've removed & reinstalled the plugin but still no joy. :/

After chasing my tail for a while I created a new phonegap project & replaced the index.html file with the example—same exact behavior. typeof OAuth === 'undefined' :(

So far this plugin's motto is "OAuth that just doesn't exist".

anuragd commented 10 years ago

The issue was resolved after I cleaned up and redid all the steps. Not sure what solved the issue. Will update when I find out more.

Anurag Dutta

On Fri, Aug 22, 2014 at 8:06 AM, John Mifsud notifications@github.com wrote:

I have the same exact problem. I've removed & reinstalled the plugin but still no joy. :/

Reply to this email directly or view it on GitHub https://github.com/oauth-io/oauth-phonegap/issues/32#issuecomment-53015572 .

imabuddha commented 10 years ago

Thanks for the reply anuragd. I ended up coding my own OAuth library. So far only works for google, so if you ever find out what the magic is please let me know. ;-)

cbjims commented 9 years ago

Don't know if it's too late to awnser but I had the same issue.

The OAuth var is undefined if you test your app with "phonegap serve".

But if you test the app with an emulator or build the app and copy it to your phone it will work.

I think it's also doesn't work if you build with "build.phonegap.com" (I try only one time)

mgeronimo commented 9 years ago

Has anybody found the solution on this one? I've been having the same issue, too. Thanks!

angelxmoreno commented 8 years ago

The object is undefined when you test in an emulator or web. After I tried it on an actually device it worked just fine.