Page MenuHomePhabricator

[native][web] Don't stamp SQLite database until authoritative keyserver auth
AbandonedPublic

Authored by ashoat on Tue, Apr 16, 12:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 9:07 PM
Unknown Object (File)
Sat, Apr 27, 10:41 AM
Unknown Object (File)
Fri, Apr 26, 2:23 PM
Unknown Object (File)
Thu, Apr 25, 1:07 PM
Unknown Object (File)
Sun, Apr 21, 10:41 AM
Unknown Object (File)
Wed, Apr 17, 3:38 AM
Unknown Object (File)
Wed, Apr 17, 3:37 AM
Unknown Object (File)
Wed, Apr 17, 3:36 AM
Subscribers
None

Details

Reviewers
tomek
inka
Summary

This addresses ENG-7708.

Depends on D11668

Test Plan

I walked through the scenario that triggered the "Bad Credentials" bug (ENG-7450) and confirmed that it no longer occurred. Scenario is described here

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/data/sqlite-data-handler.js
150

The new changes will make this code clear the SQLite database when EITHER the authoritative keyserver cookie OR the currentUserInfo is unset. Theoretically that means the SQLite database might be cleared sooner or more often than before, but in practice I think it will be the same as before. The code in KeyserverConnectionHandler should make sure that we trigger a log out if the authoritative keyserver cookie is invalidated. Note that this should not prevent keyserver session recovery, since we defer invalidating the authoritative keyserver cookie in Redux until the recover fails

155

In D11534, @tomek updates the equivalent condition for web, but doesn't touch this one. It feels weird that they're inconsistent. Should I update this to match what we're doing on web?

native/data/sqlite-data-handler.js
141–143

can we use isLoggedInToKeyserver?

tomek added inline comments.
native/data/sqlite-data-handler.js
155

Yes, I think we should keep them consistent.

This revision is now accepted and ready to land.Wed, Apr 17, 6:28 AM

More context in the task, but I'm abandoning this approach in favor of another, more idiomatic/clean one

native/data/sqlite-data-handler.js
155

I'll put up a separate diff for this

native/data/sqlite-data-handler.js
155