Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find variable: OAuth #32

Open
anuragd opened this issue Aug 5, 2014 · 7 comments
Open

Can't find variable: OAuth #32

anuragd opened this issue Aug 5, 2014 · 7 comments

Comments

@anuragd
Copy link

anuragd commented Aug 5, 2014

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
Copy link
Contributor

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
Copy link

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
Copy link
Author

anuragd commented Aug 22, 2014

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
#32 (comment)
.

@imabuddha
Copy link

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
Copy link

cbjims commented Feb 18, 2015

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
Copy link

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

@angelxmoreno
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants