简体   繁体   中英

Firebase Authentication and Google Cloud Translate

I have Firebase Authentication integrated in IOS app and I would like to use Google Cloud Platform - Translate. There are bunch of questions that I am trying to find -

How do I access Google Cloud Platform directly from IOS app?

Firebase Authentication is already integrated in Google Cloud Platform but does it have access to GC Translate?

Do we need to grant some privs for Firebase Authentication to access GC Translate?

Do I need to use Oauth2 authentication again to access GC Translate? (That doesn't make sense).

The scenario that I'm looking for - The user signs in Firebase pre-UI built and then go in the note and types "Hello" then click translate then the request will be sent to GC Translate to get the translated text - "Hola" to comes up.

How do I access Google Cloud Platform directly from IOS app?

You typically don't do this directly, as Google Cloud Translate requires specifying a server-side API key when you call it. If that key ends up in the hands of your users, they can call the API on your behalf, and you end up paying for it.

Firebase Authentication is already integrated in Google Cloud Platform but does it have access to GC Translate?

There is no direct integration from Firebase to Google Cloud Translate. The closest equivalent service in Firebase would be ML Kit's translation models .


The usual scenario is that you implement your own server-side endpoint that calls Google Cloud Translate for you. You can run this endpoint on a server you control, or on Cloud Functions. Then you call this endpoint from within your application.

This approach keeps your API key secure on the server, and allows you to control access in the code of your endpoint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM