Search code examples
c#google-cloud-firestoredesktop-application

Authentication with firestore for c# desktop app


I have prepared desktop application which is using firestore database and to get an access to it I have used GOOGLE_APPLICATION_CREDENTIALS. According to the documentation, I was not able to introduce rules for this type of authentication but I would like to do so. I have sent a question to support and I was informed to use REST API. And here is my question ? Is it possible to authenticate via REST API but to read and write data still use Google.Cloud.Firestore nuget ? How to do this ? Please remember that I have desktop app wrote in c# WPF. Maybe you know some other solution for my problem ?


Solution

  • From looking at the Github repo for the google-cloud-dotnet libraries it seems they always use GOOGLE_APPLICATION_CREDENTIALS to access Firestore.

    In that case there is no way to use the library as is with Firebase Authentication credentials. These issues on the repo also seem to point in that direction.

    To access Firestore with Firebase Authentication credentials, you'll have to access it through the REST API in that case.