App lounge: Renew anonymous user auth data without logging out
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