Comments (3)
You want to create your own InstalledFlowDelegate
(not InstalledFlow
). Does the example here help?
from yup-oauth2.
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.
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)
- Remove dependency on chrono? HOT 2
- User impersonation with service accounts HOT 6
- Accept custom connectors HOT 2
- The DefaultHyperClient does not support http - Issue with metadata server authentication HOT 1
- Is there a way to stub authenticators? HOT 3
- Service account impersonation HOT 2
- Can we make the structs JSONToken & JSONTokens Public? HOT 2
- Custom redirect URI HOT 10
- [Question] - Get the signin link (custom message) HOT 1
- HttpError occur during get token HOT 2
- Support for workload identity federation HOT 3
- PKCE
- Support for login_hint parameter
- Providing a RefreshToken for the AccessTokenAuthenticator HOT 1
- redirect_url to return String not &str HOT 4
- Method to retrieve the OAuth URL or opening the URL in the browser using the `open` crate HOT 1
- ADC Service Impersonation missing client_id HOT 2
- Upgrade to Hyper 1 HOT 2
- Is it possible to use static API key for simple usage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yup-oauth2.