Git Product home page Git Product logo

Comments (10)

zhangusc avatar zhangusc commented on May 10, 2024 2

@johnwheeler In your oAuth callback page, you write some script code to get window.location.href, extract access token from it, and then send it using CSEvent. Your main CEP extension should listen to this event and receive the token.

from cep-resources.

dinghui0712 avatar dinghui0712 commented on May 10, 2024 1

@zhangusc ,

If this is a possible solution, we will give it a try and see whether we can hack Chromium so that those web sites can be hosted in an iframe.

from cep-resources.

lyip1992 avatar lyip1992 commented on May 10, 2024

Hi @zhangusc,

Can you elaborate more on what you mean by It is not a desktop application either and doesn't have control to the browser on which it runs? Thanks.

from cep-resources.

dinghui0712 avatar dinghui0712 commented on May 10, 2024

Hi @zhangusc,

If we provide a way with which authorization page could be hosted in an iframe (instead of a new browser window), will "urn:ietf:wg:oauth:2.0:oob" work for you?

from cep-resources.

zhangusc avatar zhangusc commented on May 10, 2024

@lyip1992 In the case of desktop application. Normally, the client application starts an embedded browser to host an oauth login page from the server. If "urn:ietf:wg:oauth:2.0:oob" is specified as the callback of the authentication when sending the request, the server sends back a page with an authorization code or token in its title and content. The client application can then get the code from the page since it has the control of the browser. But in the case of CEP extension, the application itself is running inside a browser, there is no easy way for the extension to get the code from a page sent from server.

from cep-resources.

zhangusc avatar zhangusc commented on May 10, 2024

@dinghui0712 I gave it a try. But currently the browser refuse to load the page sent from oAuth server in an IFrame because the response sets 'X-Frame-Options' to 'SAMEORIGIN'. I don't know how much control you have on the embedded Chromium. But at this point, without changing either the Chromium or the response from the oAuth server, this approach don't seem to work.

from cep-resources.

johnwheeler avatar johnwheeler commented on May 10, 2024

@dinghui0712, Did you end up supporting urn:ietf:wg:oauth:2.0:oob as a redirect URI?

from cep-resources.

zhangusc avatar zhangusc commented on May 10, 2024

@dinghui0712 No. We ended up hosting a callback page on a web server for the oAuth sign-in workflow

from cep-resources.

johnwheeler avatar johnwheeler commented on May 10, 2024

@zhangusc Thank you. If you don't mind me asking, how do you pass the OAuth Access Token to the CEP Panel once it's received on the page on the hosted web server?

from cep-resources.

jiosorio2210 avatar jiosorio2210 commented on May 10, 2024

@zhangusc Hello, Can you please explain me your solution?, I was trying to do it but I do not know where should I load the callback page

from cep-resources.

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.