firebase / firebase-admin-dotnet

Firebase Admin .NET SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
366 stars 131 forks source link

Don't works via proxy #277

Closed Krey81 closed 3 years ago

Krey81 commented 3 years ago

Then i set custom HttpClientFactory in AppOptions with Proxy this works only for internal connections to https://fcm.googleapis.com. Connections to https://oauth2.googleapis.com ignore my handler and keep going directly without proxy. The problem can be solved by setting the OS environment variable https_proxy, but it breaks my other functionality. Please correct the code so that the FirebaseApp supports the custom handler in full and not partially.

Thanks.

google-oss-bot commented 3 years ago

I found a few problems with this issue:

hiranya911 commented 3 years ago

GoogleCredential API is part of a different library, and you need to configure HttpClientFactory for it separately. Unfortunately the code necessary for this is somewhat complex at the moment.

See the examples shown at https://github.com/googleapis/google-api-dotnet-client/issues/1547 and https://medium.com/google-cloud/accessing-google-cloud-apis-though-a-proxy-fe46658b5f2a.