Giter Club home page Giter Club logo

Comments (7)

bytespider avatar bytespider commented on September 22, 2024

Is your browser set up to allow cross domain requests? Most browsers by default will prevent this.

from jsoauth.

 avatar commented on September 22, 2024

That is an interesting thought. An example that requests a PIN works on Safari but not Firefox, although I did test other HTTP request on Firefox, like to the bitly API so I would assume the cross domain permissions are not an issue. As far as you are concerned, has this been tested on all common browsers?

from jsoauth.

bytespider avatar bytespider commented on September 22, 2024

Absolutely not. jsOAuth in the browser is completely untested. This is down to the security imposed on browsers. The test suite was writen to work in chrome with all security turned off purely out of convenience.

I'm very surprised that Safari worked and Firefox didn't.

You mention that you are attempting to use bitly which uses OAuth 2.0 which isn't supported in jsOAuth at the moment.

from jsoauth.

 avatar commented on September 22, 2024

I see. So basically are you saying it is not a good idea to use oauth with javascript and that you should really do this server side? I'm just wondering how Facebook javascript client does this, I mean it's definitely JavaScript yet it works fine.

Regarding bitly, I was only trying REST requests without oauth.

from jsoauth.

bytespider avatar bytespider commented on September 22, 2024

No I'm saying in the browser it's not advised. Facebook uses OAuth 2.0 and probably has CORS support.

from jsoauth.

 avatar commented on September 22, 2024

Ok, well thanks for your help. I need to have this implemented by Tuesday so will try the JavaScript way for now.

from jsoauth.

lukaszkorecki avatar lukaszkorecki commented on September 22, 2024

It worked in Safari because if you open a local .html file the browser switches to a kind of "dashboard widgets dev mode" and disables Same Origin Policy

from jsoauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.