Skip to content

Commit 77e6663

Browse files
ryanwilsonehsannas
andauthored
Revert "Re-establish streams when App Check token expires. (#9233)" (#9315) (#9320)
Co-authored-by: Ehsan <[email protected]>
1 parent 0678064 commit 77e6663

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

Firestore/CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
- [changed] Add more details to the assertion failure in OrderBy::Compare() to
33
help with future debugging (#9258).
44

5-
# v8.12.0
6-
- [fixed] Fixed an AppCheck issue that caused Firestore listeners to stop
7-
working and receive a "Permission Denied" error. This issue only occurred for
8-
AppCheck users that set their expiration time to under an hour.
9-
105
# v8.11.0
116
- [fixed] Fixed an issue that can result in incomplete Query snapshots when an
127
app is backgrounded during query execution.

Firestore/core/src/core/firestore_client.cc

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -145,23 +145,10 @@ std::shared_ptr<FirestoreClient> FirestoreClient::Create(
145145
};
146146

147147
shared_client->app_check_credentials_provider_->SetCredentialChangeListener(
148-
[weak_client](const std::string&) {
149-
auto shared_client = weak_client.lock();
150-
if (!shared_client) return;
151-
// It is okay to ignore an App Check token change notification if
152-
// FirestoreClient::Initialize has not been invoked yet because
153-
// once initialization does occur, setting up new watch streams will use
154-
// the latest App Check token available.
155-
if (shared_client->credentials_initialized_) {
156-
shared_client->worker_queue_->Enqueue([shared_client] {
157-
LOG_DEBUG("App Check token Changed.");
158-
// This will ensure that once a new App Check token is retrieved,
159-
// streams are re-established using the new token.
160-
shared_client->remote_store_->HandleCredentialChange();
161-
});
162-
}
148+
[](std::string) {
149+
// Register an empty credentials change listener to activate token
150+
// refresh.
163151
});
164-
165152
shared_client->auth_credentials_provider_->SetCredentialChangeListener(
166153
credential_change_listener);
167154

0 commit comments

Comments
 (0)