Repository navigation
Say whether the client still works when forget_device fails - #170
LucaCappelletti94 wants to merge 2 commits into
Conversation
…ete teardown that names each failed part
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
==========================================
+ Coverage 85.07% 87.78% +2.71%
==========================================
Files 188 188
Lines 50326 50427 +101
Branches 50326 50427 +101
==========================================
+ Hits 42813 44266 +1453
+ Misses 5414 4073 -1341
+ Partials 2099 2088 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



When forget_device failed, the error could not tell an app whether its client still worked. ForgetError::Client covered both a failure before anything was touched and a failure after the client was already closed, so both demos kept a session that might be dead. NotRevoked also claimed the stored credential was cleared when reading or clearing it had failed, and when several steps failed only one was reported.
ForgetError is now Refused, where nothing was destroyed and the client still works, or Incomplete, where the client is closed and a report names each part that failed: releasing the replica, the stored credential, the revoke, the wipe and the device key. Once the client is closed every part runs even when an earlier one failed, except the device key, which still goes only once the wipe stands. Both demos keep the session on a refusal, and on an incomplete forget sign in again and show what was left on the sign-in screen.