- Notifications
You must be signed in to change notification settings - Fork1k
feat: keep original token refresh error in external auth#19339
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
mostly makes sense to me, though I'm not very familiar with external auth stuff. might be worth waiting to see if someone else comes along to review.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
External auth refresh errors lose the original error thrown on thefirst refresh. This PR saves that error to the database to be raisedon subsequent refresh attempts
cccd7ae
tob0a1694
Compare4926410
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
External auth refresh errors lose the original error thrown on the first refresh. This PR saves that error to the database to be raised on subsequent refresh attempts
Addresses:#18811
The issue assumed refresh tokens were being tossed for temporary issues (like an IdP being down). We have code to handle this, however the original error being lost made that code invisible. By keeping the original error, now the reason for the token being invalid is saved (assuming it is a refresh error).
Error now
Before
This is the behavior before. The first time this failure occurs, it is raised. Subsequent errors always show
Error: token expired, refreshing is either disabled or refreshing failed and will not be retried
. This subsequent error makes it difficult to debug the original cause.Screencast.From.2025-08-13.10-29-11.webm
Future work
The error could be better formatted. This PR does not attempt to update the error format, it just retains the first error message.