HomePhabricator
Diffusion Comm 2f319716de3b

[lib][native] Try session recovery on web too for policy acknowledgment crash…

Description

[lib][native] Try session recovery on web too for policy acknowledgment crash loop

Summary:
We have code that attempts a session recovery on native when we encounter a policy acknowledgment crash loop. However on web, we don't do anything.

I'm guessing this is the case for two reasons:

  1. Prior to recent changes, a refresh on web would easily resolve the issue.
  2. Keyserver session recovery used to only work on native since it required a password.

Since a refresh likely won't resolve the issue anymore, and since keyserver session recovery will soon be possible on web, I decided to make the code for attempting a session recovery work for web too.

Note that if a session recovery is not possible (or if the session recovery fails), this will result in the user's session being invalidated, and the user being logged out. I think this is probably for the best.

Note that the code for the Alert still needs to be native-specific. I don't have the cycles right now to implement an Alert for the web, but we should eventually do that too: ENG-6733

Depends on D11216

Test Plan: Part 4.5 of this test plan: https://gist.github.com/Ashoat/75ab690d5c53cdd68a51b02e03e27c58

Reviewers: inka, tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D11217