SF-3816 Fix error being logged when a user has an invalid token#3980
SF-3816 Fix error being logged when a user has an invalid token#3980pmachapman wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami reviewed 3 files and all commit messages, and made 2 comments.
Reviewable status: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')
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman made 1 comment.
Reviewable status: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.tshas a helper method for precisely this kind of check:hasPropWithValue(error, 'error', 'invalid_grant')
Done. Thank you!
|
I should note I have not run the acceptance tests. I've been code reviewing several PRs without consideration of their individual testing needs. |
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