Order the steps
Order the logout steps.
- Navigate to login, clearing the back stack
- Cancel WorkManager jobs for this user
- Reset in-memory repositories and delete tokens
- Clear the database, per-user DataStore and caches
- Revoke the refresh token on the server and unregister push
Choose an answer, then open Show answer below to check it.
Show answer
Answer: B E D C A
- Cancel WorkManager jobs for this user So nothing writes or uploads during cleanup.
- Revoke the refresh token on the server and unregister push Stops the old session working anywhere.
- Clear the database, per-user DataStore and caches Removes private data.
- Reset in-memory repositories and delete tokens No stale state in singletons.
- Navigate to login, clearing the back stack The previous user's screens can't be reached with Back.