Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

App lounge: Renew anonymous user auth data without logging out

Sayantan Roychowdhury requested to merge 5168-app_logging_out into main

Description

If authentication data is expired, user is logged out of App Lounge and prompted to login again.
This patch fixes it for Anonymous users.
For Google login users, App Lounge will still ask to login.

Issue(s)

https://gitlab.e.foundation/e/backlog/-/issues/5168

Test environment

Gradle build against 5168-app_logging_out branch, install the apk into the device

Test procedures

Use App Lounge normally in anonymous mode. Check if it ever asks to login again after extensive use.

Technical details

If auth data was invalid, previously DataStoreModule.destroyCredentials() would clear the user type as well, causing SignInFragment to appear.
Now we no not clear the user type if it is User.ANONYMOUS, for which we just regenerate new auth data.
For type User.GOOGLE, we clear the DataStoreModule.USERTYPE value, which causes HomeFragment.onTosAccepted() to ask the user to login again.

Screenshots

Check list

  • Self review
  • Test procedure explained
  • Tested on fresh install
  • Tested applied as an update
  • License
  • Internal documentation
  • User documentation
Edited by Sayantan Roychowdhury

Merge request reports

Loading