Skip to content

Auth: Return recovery PendingIntent for modern clients - #3788

Open
Noir-Lime wants to merge 1 commit into
microg:masterfrom
Noir-Lime:fix/upstream-auth-recovery-pending-intent
Open

Auth: Return recovery PendingIntent for modern clients#3788
Noir-Lime wants to merge 1 commit into
microg:masterfrom
Noir-Lime:fix/upstream-auth-recovery-pending-intent

Conversation

@Noir-Lime

Copy link
Copy Markdown

Summary

Return userRecoveryPendingIntent alongside the existing userRecoveryIntent when token retrieval requires user permission. Reuse the same immutable PendingIntent for the auth notification. Older clients still receive the original Intent.

Client behavior

Google's com.google.android.gms:play-services-auth-base:18.3.0 client reads both bundle keys. Its getTokenWithDetails error handling logs the following when the advertised GmsCore version is at least 233800000 and the PendingIntent is missing:

Recovery PendingIntent is missing on current Gms version: ...
It should always be present on or above Gms version 233800000.
This indicates a bug in Gms implementation.

This threshold is observable in the client implementation, not a claim about public API documentation. The client still constructs a legacy recovery exception if only the Intent is present; this patch supplies the modern recovery payload too.

Artifact: https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-auth-base/18.3.0/play-services-auth-base-18.3.0.aar

Verification

  • Cherry-picked the same one-file change onto current upstream master; git diff --check passes.
  • Built the patch in Morphe MicroG-RE 7.1.0 using JDK 17 and :play-services-core:assembleDefaultRelease -Pabi=arm64-v8a.
  • Installed that downstream build on a OnePlus 15 running Android 16. Morphe YouTube 21.07.247 loaded the account afterward, and the original missing-PendingIntent/account-list errors were absent from the captured logs.
  • The device test included uninstalling/reinstalling MicroG and re-adding the account due to a signing-key change. It is not an isolated A/B test proving the patch alone resolves the account-loading issue. This upstream branch has not separately been built or device-tested.

Originally proposed in MorpheApp#249; submitting upstream at the downstream maintainer's request. That PR remains open.

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