Coder Social home page Coder Social logo

API improvements for Flows about yup-oauth2 HOT 3 CLOSED

elpiel avatar elpiel commented on June 26, 2024
API improvements for Flows

from yup-oauth2.

Comments (3)

ggriffiniii avatar ggriffiniii commented on June 26, 2024

You want to create your own InstalledFlowDelegate (not InstalledFlow). Does the example here help?

from yup-oauth2.

elpiel avatar elpiel commented on June 26, 2024

yes, actually it does. Somehow I missed this method in the builder.

I'm still not sure how this could be integrated in e.g. a webserver route to directly redirect and later redirect back the user to the same path. I might try implementing it and maybe adding example for that too.

from yup-oauth2.

dermesser avatar dermesser commented on June 26, 2024

You're actually the second person in a short time (#191) to stumble over this, and even I didn't remember it at first sight. This clearly means that the documentation is lacking :) I will try to come up with some more explicit explanations around this somewhat unintuitive (at least for a Rust library) structure.

I'm still not sure how this could be integrated in e.g. a webserver route to directly redirect and later redirect back the user to the same path. I might try implementing it and maybe adding example for that too.

If you are working against an API using the "Installed Application Flow", it seems that this is your scenario (correct me if I'm wrong): https://developers.google.com/identity/protocols/oauth2/web-server#httprest_1

In that case, your server will obtain the authorization code through the callback that your user is redirected to by the provider. This will typically be an endpoint in the same server app or on some other server; right?

At that point it depends on your architecture how you get the code from the redirect URI back into your flow delegate. For example, if the redirect URI is handled by the same process, you might use some global "message broker" kind of architecture within the process allowing you to receive the code in the flow delegate.

Please let me know if I understood correctly what it is that you're stuck on!

from yup-oauth2.

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.