Repository navigation
Auth (Desktop): send heartbeats on SecureTokenRequest - #2003
Merged
Merged
Conversation
Pass deliver_heartbeat = true in SecureTokenRequest so returning desktop users refreshing persisted sessions via securetoken.googleapis.com/v1/token attach the stored heartbeat header (x-firebase-client) and X-Firebase-GMPID, matching the other Auth desktop requests and Firebase iOS Auth. Update AuthRequestHeartbeatTest to verify SecureTokenRequest includes the heartbeat and GMP App ID headers.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates SecureTokenRequest to enable heartbeat payloads by changing the third argument of the AuthRequest constructor to true. Additionally, the corresponding unit test in auth_request_heartbeat_test.cc has been updated to verify that the request headers now include both the heartbeat payload and the GMP App ID. There are no review comments, so I have no feedback to provide.
a-maurice
approved these changes
Dec 3, 2026
AustinBenoit
enabled auto-merge (squash)
December 3, 2026 20:24
✅ Integration test succeeded!Requested by @AustinBenoit on commit 8220359 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Pass
deliver_heartbeat = trueinSecureTokenRequestso returning desktop users refreshing persisted Auth sessions viasecuretoken.googleapis.com/v1/tokenattach the stored heartbeat header (x-firebase-client) andX-Firebase-GMPID, matching the other desktop Auth RPCs and Firebase iOS Auth.Previously,
SecureTokenRequestwas the only desktop Auth RPC passingdeliver_heartbeat = false, so returning signed-in desktop sessions that only refreshed expired ID tokens never flushed daily heartbeats through Auth.Changes
auth/src/desktop/rpcs/secure_token_request.cc: passtruefordeliver_heartbeattoAuthRequest.auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc: updateTestSecureTokenRequestHasHeartbeatto assertx-firebase-clientandX-Firebase-GMPIDare populated.Testing
firebase_auth_request_heartbeat_test,firebase_auth_secure_token_test,firebase_auth_desktop_test,firebase_auth_user_test,firebase_auth_test).