Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auth/src/desktop/rpcs/secure_token_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
Expand Down
10 changes: 5 additions & 5 deletions auth/tests/desktop/rpcs/auth_request_heartbeat_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading