[PM-33569] fix: Remove pending login request if it no longer exists#2498
[PM-33569] fix: Remove pending login request if it no longer exists#2498matt-livefront merged 1 commit intomainfrom
Conversation
|
Claude finished @matt-livefront's task in 2m 3s —— View job Code Review: PM-33569 Remove pending login request if it no longer exists
SummaryThis PR correctly fixes a bug where expired/deleted pending login requests were never cleaned up from local state, causing the app to repeatedly attempt to fetch them on each vault unlock. Changes reviewed:
No actionable findings. The fix is correct, well-scoped, and properly tested. The error handling follows established patterns in the codebase, and the refactoring in |
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2498 +/- ##
=======================================
Coverage 86.92% 86.92%
=======================================
Files 1846 1846
Lines 163487 163542 +55
=======================================
+ Hits 142110 142158 +48
- Misses 21377 21384 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| let content = UNMutableNotificationContent() | ||
| content.title = Localizations.logInRequested | ||
| content.body = Localizations.confimLogInAttempForX(loginSourceEmail) | ||
| content.body = Localizations.confirmLogInAttemptForX(loginSourceEmail) |

🎟️ Tracking
PM-33569
📔 Objective
When a login with device push notification is received by the app, the app will attempt to prompt the user immediately.
It's possible that it can't be shown immediately (app is backgrounded and killed before the user returns or the user's vault is locked when the push notification is received). For this case, the login with device request is persisted until the next vault unlock, when we attempt to show it to the user. In the meantime, it's possible that the request has expired and been removed from the server, resulting in a 404.
When this occurred, an error was logged to the console/flight recorder, but the persisted request was never deleted. So the app would continue to try and fetch the request on each vault unlock.
This catches the error and deletes the request so the app doesn't continue to try fetching it.