-
Notifications
You must be signed in to change notification settings - Fork 116
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
Server-side oauth flow #107
Comments
Are you sure? I only skimmed it, but it sounded a lot like the |
@dermesser
The first one should return redirect uri to the caller. The second one - consume the code generated when user logged in. And that’s the problem. I don’t know how to “divide” the flow in this library on these two parts. |
I see. I will take a look when I find some time - in the meantime you are of course welcome to try some things yourself, if it is time-sensitive :) |
Having a
Note that these two steps could very well happen in two separate processes, e.g. when the web-app is horizontally scaling. The current TokenStorage implementation (of course) doesn't support storing the CSRF token, and doesn't support storing more than one user's worth of tokens. Similarly constraining is the way flows are called, keeping the library user from interfering with the user interaction. I've got two different ideas on how to implement this, and would love to get some guidance from @dermesser and anyone else with a stake in this to see which one is more acceptable to this project: The neater (but more intrusive) idea is based on the observation that all current flows and the server flow do have the same "get auth code", "exchange code for token" structure. I could break apart Alternatively I could create a separate Builder stack that creates an I haven't yet fully thought through how the web-app would store and re-hydrate authenticators/TokenInfos on every request, so this might be missing something crucial. |
Thank you @DavidS for your ideas. I'm open to accepting such changes in any case - however, I'm somewhat busy these days, so please give me a few more days to ponder on this :) I hope it is not a very pressing issue. With that said, it is not surprising that you are hitting the limits of this library, as it originated in a somewhat simple client app (yup = youtube uploader) and is now being used for all sorts of different use cases. I hope we can join forces in adapting it to more demanding contexts like yours. |
I'm certainly in no hurry, thanks for your encouragement. I've started poking around the edges of the problem in code-form over the weekend, and the first step only needs a utility function very similar to Line 26 in 29a7244
That could be an easy wrap to expose that as With that being so simple, a ServerFlow might just be called as
If I get something working I'll certainly report back. |
Hi there!
There is no Server-side oauth flow implemented in this library. While implementing a custom solution for myself I wanted to ask if there were any discussions about implementing server-side flow?
If not - I can help with that. But overall library implementation won't fit for this flow (as far as I could understand from spending some time with sources of this library). If somebody is open to collaborating on it - I will be glad to contribute
The text was updated successfully, but these errors were encountered: