-
Notifications
You must be signed in to change notification settings - Fork 34
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
OAuth2: onAuthError callback not invoked #45
Comments
Hi! Normally I won't expect a 401 to trigger this error event, because a 401 alone should just cause the client to go back to the 'token' endpoint and refresh. If that fails, (typically with a 400 Bad Request), the event should trigger. Does that describe your case? If yes, it's indeed likely a bug! |
It appears the onAuthError event is actually never called. I must have had plans to implement this, but never completed it |
@shtools-gmbh I have a PR #46. Do you have a way to test if this works for you? |
Hi,
On the first occurance of invalid refresh token, the onAuthError callback is called and the user is redirected to the login page. So i would say, that your implementation is working now. |
Hi @shtools-gmbh, I don't fully understand why it would keep redirecting on subsequent errors. Given your use of Sorry for the super late reply here, I get a lot of messages from github and mis more than I'd like =( |
I'm closing this as fixed for the moment though, as far as I can tell the flow should be correct |
Hi, i´m using version 7.1.1 of this library and i try to handle the case when refresh token is expired. There is the option onAuthError i found in your docs but can´t get it to work.
token refresh is working and the onTokenUpdate callback is triggered on update. Whereas on error with status code 401 the onAuthError callback is just not called.
Is there something i´m missing?
The text was updated successfully, but these errors were encountered: