-
Notifications
You must be signed in to change notification settings - Fork 694
Improve default oauth interceptor #515
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
Improve default oauth interceptor #515
Conversation
aa575a8
to
79b36af
Compare
Interesting PR! Have not had time to test it yet, but looks like a good idea. Only thing I conceptually I'm on the fence about is whether you want this behavior always, or possibly as an opt in for users. Some might prefer their own services and whatnot to handle this... Has a (thin) relation to #414 |
ok. let me know when and what I should adopt. could also provide some unit tests. |
Thanks for this PR. I'm not sure about it. Does it postpone the request every time for 1 sec? |
nope. |
thx! |
This would be a nice PR: adding a flag that makes the interceptor to refresh the token when it was expired |
@manfredsteyer you want to make this behavior configurable with a flag? |
In a project we have the problem that after the redirection the access_token is not available. Hence, the first requests are sent without the token even we configured the interceptor with
send_access_token
. In the projekt we are using a custom interceptor similar to improved interceptor in the PR, where we wait for the token to be loaded from theOAuthService
. I wanted to contribute this change back.Let me know if this change makes sense for you.