Skip to content

SF-3816 Fix error being logged when a user has an invalid token#3980

Open
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3816
Open

SF-3816 Fix error being logged when a user has an invalid token#3980
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3816

Conversation

@pmachapman

@pmachapman pmachapman commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

I have marked this PR as not requiring testing, as it should be tested by a developer because it requires modifying your Auth0 profile (by clearing your device tokens in Auth0) to recreate the issue.


This change is Reviewable

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.04%. Comparing base (6e818b7) to head (15ff9e7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3980   +/-   ##
=======================================
  Coverage   81.03%   81.04%           
=======================================
  Files         645      645           
  Lines       41522    41525    +3     
  Branches     6763     6764    +1     
=======================================
+ Hits        33649    33652    +3     
  Misses       6761     6761           
  Partials     1112     1112           

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

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Nateowami reviewed 3 files and all commit messages, and made 2 comments.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/xforge-common/auth.service.ts line 540 at r1 (raw file):

    // Handle invalid_grant from Auth0
    if (typeof error === 'object' && error !== null && 'error' in error && error.error === 'invalid_grant') {

For what it's worth, src/SIL.XForge.Scripture/ClientApp/src/type-utils.ts has a helper method for precisely this kind of check:

hasPropWithValue(error, 'error', 'invalid_grant')

@Nateowami Nateowami self-assigned this Jul 15, 2026

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmachapman made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/xforge-common/auth.service.ts line 540 at r1 (raw file):

Previously, Nateowami wrote…

For what it's worth, src/SIL.XForge.Scripture/ClientApp/src/type-utils.ts has a helper method for precisely this kind of check:

hasPropWithValue(error, 'error', 'invalid_grant')

Done. Thank you!

@Nateowami

Copy link
Copy Markdown
Collaborator

I should note I have not run the acceptance tests. I've been code reviewing several PRs without consideration of their individual testing needs.

@pmachapman
pmachapman temporarily deployed to screenshot_diff July 15, 2026 22:47 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants