Closed k-bx closed 1 year ago
I think the pub(crate)
on the flow_delegate field is what caused the misunderstanding - I totally missed it. Sorry about that and thanks for the PR!
No problem. Feel free to dismiss this PR and reimplement more properly if needed.
By the way, have you also tried the documented way of https://docs.rs/yup-oauth2/latest/yup_oauth2/struct.InstalledFlowAuthenticator.html: InstalledFlowAuthenticator::builder(..).flow_delegate(..).build(..)
? It's been some time since I worked on that code, so it didn't come to mind immediately, either.
@dermesser is it not shown at the link since it's not pub(crate)
too?
@dermesser is it not shown at the link since it's not
pub(crate)
too?
Sorry, wrong link. I meant https://docs.rs/yup-oauth2/latest/yup_oauth2/authenticator/struct.AuthenticatorBuilder.html#method.flow_delegate-1 and supplying your own flow delegate, which gives you the opportunity of both specifying the redirect_uri and capturing the code.
What got me confused, I think, is that what you were trying to do is how things used to be done. Then it was refactored into the current "Java-Style", which made some things non-obvious.
@dermesser you are right, this API worked!
Thank you for the hint.
No worries, and sorry for taking so many detours :D
Resolves https://github.com/dermesser/yup-oauth2/issues/191