Reputation: 419
I wish to use the firebase admin-sdk but for some reason, I am getting a "project id is required to access Firestore error".
I have downloaded an admin-sdk json file from the firebase console and I have placed it in the same directory as the file that calls it.
opt := option.WithCredentialsFile("../<FILENAME>.json")
The credentials file has the project id but for some reason the opt
variable is unable to extract data from the credentials file, and as a result when I try to get the firestore client this error is occuring.
Thanks!
Upvotes: 2
Views: 3547