Skip to content

Games: Ask to create a Play Games profile instead of looping sign-in - #4063

Open
haydexlawal wants to merge 1 commit into
microg:masterfrom
haydexlawal:games-create-player-prompt
Open

haydexlawal wants to merge 1 commit into
microg:masterfrom
haydexlawal:games-create-player-prompt

Conversation

@haydexlawal

@haydexlawal haydexlawal commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

When a Google account has no Play Games profile and Allow Play Games account registration is off (the default), performGamesSignIn() gets a 404 from games/v1/players/me and returns false. GamesSignInActivity ignored that result and still returned RESULT_OK. The game then asked to sign in again straight away, so the account picker kept coming back until it was dismissed. Scrabble GO showed it 15 to 24 times in a row.

With this change, performGamesSignIn() throws PlayerNotFoundException in that case, and GamesSignInActivity asks "Create a Play Games profile?":

  • Create profile: the profile is created for this sign-in, and sign-in continues.
  • Cancel, or any other failure: the activity finishes without RESULT_OK, so the game stops asking.

The registration setting itself is unchanged. GamesConnectService keeps its current behaviour, since autoSelectLogin() already treats the exception as a failed silent sign-in.

Tested with Scrabble GO on /e/OS 4.5 (Android 15 and Android 16) with an account that had no Play Games profile:

  • The dialog shows once.
  • Create profile signs in.
  • Cancel stops the loop.

Related: #4064 (stale cached profile and revoked token) touches the same 404 branch in extensions.kt, so whichever is merged second needs a small rebase.

When a Google account has no Play Games profile and automatic profile
creation is turned off, sign-in failed silently but the sign-in screen
still reported success to the game. Games like Scrabble GO then asked
to sign in again straight away, so the account picker kept coming back.

Now microG asks whether to create a Play Games profile for the account.
If the user agrees, the profile is created and sign-in continues. If
they decline, or sign-in fails for another reason, the game is told
that sign-in did not succeed, so it stops asking. The automatic
creation setting is unchanged.

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