Skip to content

classify error descriptions for invalid_grant error#1416

Merged
nooreldeenmansour merged 1 commit intomainfrom
invalid-grant-classifications
Apr 13, 2026
Merged

classify error descriptions for invalid_grant error#1416
nooreldeenmansour merged 1 commit intomainfrom
invalid-grant-classifications

Conversation

@nooreldeenmansour
Copy link
Copy Markdown
Member

Note

This PR is based on #1408. Please review and merge it first.

To accurately handle expired tokens errors, and prompt users to redo device flow for only resolvable errors. we need to classify it based on the error descriptions provided, as the invalid_grant scope is too wide.

This commit uses the error descriptions provided by Keycloak as a generic provider.

Closes #1411
UDENG-9465

@nooreldeenmansour nooreldeenmansour changed the base branch from improve-expired-tokens-ux to main April 8, 2026 08:02
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.30%. Comparing base (f1b575d) to head (4c5960d).
⚠️ Report is 81 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1416      +/-   ##
==========================================
+ Coverage   80.02%   80.30%   +0.27%     
==========================================
  Files          20       20              
  Lines         991     1000       +9     
==========================================
+ Hits          793      803      +10     
+ Misses        198      197       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nooreldeenmansour nooreldeenmansour changed the base branch from main to improve-expired-tokens-ux April 8, 2026 08:10
@nooreldeenmansour nooreldeenmansour changed the base branch from improve-expired-tokens-ux to main April 8, 2026 08:25
To accurately handle expired tokens errors, we need to classify it based
on the error descriptions provided, as `invalid_grant` scope is too
wide.
This commit uses the error descriptions provided by Keycloak as a
generic provider
@nooreldeenmansour nooreldeenmansour force-pushed the invalid-grant-classifications branch from 030c8f7 to 4c5960d Compare April 8, 2026 08:41
@nooreldeenmansour nooreldeenmansour marked this pull request as ready for review April 8, 2026 08:42
@nooreldeenmansour nooreldeenmansour merged commit a439139 into main Apr 13, 2026
23 of 28 checks passed
@nooreldeenmansour nooreldeenmansour deleted the invalid-grant-classifications branch April 13, 2026 16:02
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

Successfully merging this pull request may close these issues.

Improve invalid_grant error classification for Google and generic OIDC providers

2 participants