Skip to content
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

onBefore middleware is infinitely recursive #8

Open
bpicolo opened this issue Oct 4, 2016 · 2 comments
Open

onBefore middleware is infinitely recursive #8

bpicolo opened this issue Oct 4, 2016 · 2 comments

Comments

@bpicolo
Copy link

bpicolo commented Oct 4, 2016

Can't find anywhere this is supposed to resolve itself. The docs suggest we should be using the same client for tokens, middleware, etc. Problem is, onBefore is going to fire a request, which is naturally going to attempt to call onBefore again.

The onBefore token fetching is infinitely recursive if that same client is used to fetch the initial token. (i.e. given the readme example)

Is there something I'm missing?

Edit: You can indeed solve this by using a separate guzzle client for tokens + middleware, but seems like that should be documented or resolved :D

@dm
Copy link

dm commented Feb 11, 2017

Hi @bpicolo, I've left Sainsbury's, but since the codebase that used guzzle-oauth2-plugin has been removed before that, I doubt there will be the need to maintain this internally. And since I've left the organisation, I can't fix/push changes to this either way.
Cheers,
Dan

@Tobion
Copy link

Tobion commented Aug 3, 2017

Fixed by #12. Please close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants