diff --git a/auth/src/desktop/rpcs/secure_token_request.cc b/auth/src/desktop/rpcs/secure_token_request.cc index 34274d0dfd..08596b0990 100644 --- a/auth/src/desktop/rpcs/secure_token_request.cc +++ b/auth/src/desktop/rpcs/secure_token_request.cc @@ -27,7 +27,7 @@ namespace auth { SecureTokenRequest::SecureTokenRequest(::firebase::App& app, const char* api_key, const char* refresh_token) - : AuthRequest(app, request_resource_data, false) { + : AuthRequest(app, request_resource_data, true) { FIREBASE_ASSERT_RETURN_VOID(api_key); const char api_host[] = "securetoken.googleapis.com/v1/token?key="; diff --git a/auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc b/auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc index d327397b62..78ebc66dcd 100644 --- a/auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc +++ b/auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc @@ -128,13 +128,13 @@ TEST_F(AuthRequestHeartbeatTest, TestResetPasswordRequestHasHeartbeat) { #endif // FIREBASE_PLATFORM_DESKTOP #if FIREBASE_PLATFORM_DESKTOP -TEST_F(AuthRequestHeartbeatTest, TestSecureTokenRequestDoesNotHaveHeartbeat) { +TEST_F(AuthRequestHeartbeatTest, TestSecureTokenRequestHasHeartbeat) { SecureTokenRequest request(*app_, "APIKEY", "email"); - // SecureTokenRequest should not have heartbeat payload since it is sent - // to a backend that does not support the payload. - EXPECT_EQ("", request.options().header[app_common::kApiClientHeader]); - EXPECT_EQ("", request.options().header[app_common::kXFirebaseGmpIdHeader]); + // The request headers should include both heartbeat payload and GMP App ID. + EXPECT_NE("", request.options().header[app_common::kApiClientHeader]); + EXPECT_EQ("com.google.firebase.testing", + request.options().header[app_common::kXFirebaseGmpIdHeader]); } #endif // FIREBASE_PLATFORM_DESKTOP