Skip to content

Commit

Permalink
Hacky Credentials Fix (#3541)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian authored Aug 10, 2018
1 parent 982f1ba commit 5e8d847
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ public Builder setTimestampsInSnapshotsEnabled(boolean value) {
@Override
@Nonnull
public FirestoreOptions build() {
if (this.credentials == null && this.credentialsProvider != null) {
try {
this.setCredentials(credentialsProvider.getCredentials());
} catch (IOException e) {
throw new RuntimeException("Failed to obtain credentials", e);
}
}

return new FirestoreOptions(this);
}
}
Expand Down

0 comments on commit 5e8d847

Please sign in to comment.