File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
google-cloud-firestore/src/main/java/com/google/cloud/firestore Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1919import com .google .api .core .ApiFunction ;
2020import com .google .api .core .InternalApi ;
2121import com .google .api .gax .core .CredentialsProvider ;
22+ import com .google .api .gax .core .FixedCredentialsProvider ;
2223import com .google .api .gax .core .GoogleCredentialsProvider ;
2324import com .google .api .gax .grpc .InstantiatingGrpcChannelProvider ;
2425import com .google .api .gax .rpc .TransportChannelProvider ;
@@ -255,7 +256,9 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder input) {
255256 }
256257 })
257258 .build ());
258- this .setCredentials (new FakeCredentials ());
259+ // Use a `CredentialProvider` to match the Firebase Admin SDK, which prevents the Admin SDK
260+ // from overwriting the Emulator credentials.
261+ this .setCredentialsProvider (FixedCredentialsProvider .create (new FakeCredentials ()));
259262 }
260263
261264 return new FirestoreOptions (this );
You can’t perform that action at this time.
0 commit comments