Skip to content

Games: Check again for a Play Games profile after it was deleted - #4064

Open
haydexlawal wants to merge 1 commit into
microg:masterfrom
haydexlawal:games-recheck-deleted-profile
Open

haydexlawal wants to merge 1 commit into
microg:masterfrom
haydexlawal:games-recheck-deleted-profile

Conversation

@haydexlawal

@haydexlawal haydexlawal commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

After a Play Games profile is deleted, microG can still behave as if the account has one:

  • Stale cached profile: with registration turned off, a 404 from games/v1/players/me returned false but kept the player cached in GamesConfigurationService. The next sign-in got issueAdvice=stored and a cached player, so it skipped the check and reported success. The game kept asking to sign in.
  • Revoked token: a games_lite token saved before the deletion gets a 401 from players/me. That error isn't handled, so sign-in failed.

This change clears the cached player on 404 when the profile won't be created. On 401 it invalidates the token and requests a new one once before checking again.

Tested on /e/OS 4.5 (Android 15 and Android 16):

  • Profile deleted in microG settings: the next sign-in hits the 401, gets a new token, then gets the 404.
  • Profile deleted from another device with the same account: same 401 → new token → 404 sequence.

Related: #4063 changes the same 404 branch, so whichever is merged second needs a small rebase.

After a Play Games profile was deleted, microG could still treat the
account as signed in to Play Games:

- If profile creation is turned off, the profile microG had cached from
  before was kept. On the next sign-in microG skipped the check with
  Google and reported success, so the game kept asking to sign in.
- A sign-in token saved before the deletion is no longer accepted by
  Google, and the profile check failed instead of asking for a new
  token.

Now microG forgets the cached profile when Google says it no longer
exists, and asks for a new token once when the saved one is rejected.

Issue: https://gitlab.e.foundation/e/os/backlog/-/work_items/4101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant