Skip to content

Commit 622a911

Browse files
authored
Minimal fix for b/74357976 (#890)
Fixes b/74357976 which caused unauthenticated users to be unable to reach the Firestore backend and updates the changelog.
1 parent 0771482 commit 622a911

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Firestore/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Unreleased
22

3+
# v0.10.3
4+
- [fixed] Fixed a regression in the 4.10.0 Firebase iOS SDK release that
5+
prevented the SDK from communicating with the backend before successfully
6+
authenticating via Firebase Authentication or after unauthenticating and
7+
re-authenticating. Reads and writes would silently be executed locally
8+
but not sent to the backend.
9+
310
# v0.10.2
411
- [changed] When you delete a FirebaseApp, the associated Firestore instances
512
are now also deleted (#683).

Firestore/Source/Remote/FSTDatastore.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ - (void)invokeRPCWithFactory:(GRPCProtoCall * (^)(void))rpcFactory
313313
[FSTDatastore
314314
prepareHeadersForRPC:rpc
315315
databaseID:&self.databaseInfo->database_id()
316-
token:(result.is_valid() ? result.token()
316+
token:(result.user().is_authenticated() ? result.token()
317317
: absl::string_view())];
318318
[rpc start];
319319
}

Firestore/Source/Remote/FSTStream.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ - (void)resumeStartWithToken:(const Token &)token error:(NSError *)error {
297297

298298
[FSTDatastore prepareHeadersForRPC:_rpc
299299
databaseID:&self.databaseInfo->database_id()
300-
token:(token.is_valid() ? token.token() : absl::string_view())];
300+
token:(token.user().is_authenticated() ? token.token() : absl::string_view())];
301301
FSTAssert(_callbackFilter == nil, @"GRX Filter must be nil");
302302
_callbackFilter = [[FSTCallbackFilter alloc] initWithStream:self];
303303
[_rpc startWithWriteable:_callbackFilter];

0 commit comments

Comments
 (0)