Shubham Maheshwari
Shubham Maheshwari

Reputation: 139

Firebase Authentication with App Engine Automatic scaling

I am trying to create a prototype using Firebase on AppEngine, and I keep hitting the 9-hour quota as described here: https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio#configuring_the_app_engine_backend_to_use_manual_scaling

The doc states the following:

To use Firebase with App Engine standard environment, you must use manual scaling. This is because Firebase uses background threads to listen for changes and App Engine standard environment allows long-lived background threads only on manually scaled backend instances.

I am just using Firebase Authentication and Need to verify the clients hitting my app engine endpoints which I do using Firebase Admin SDK. so does it still need to spawn threads to listen for changes? Is there a way to configure Firebase to not need these background threads, and therefore, not need manual scaling?

OR is there any other easy way to Do OAUTH custom authentication for anonymous & different social providers ?

Upvotes: 4

Views: 535

Answers (2)

Michael Meyer
Michael Meyer

Reputation: 2184

yes you can use the Firebase Authentication without using Backend Instances. You need to use Java Admin SDK 4.0.4. then you can run an automatic scaling instance (Frontend Instance)

Please see the following post

Verify Firebase Token at Google App Engine

Upvotes: 1

BrettJ
BrettJ

Reputation: 6851

You do not need manual scaling to use Firebase Authentication with App Engine standard environment applications.

This tutorial is for Python, but the pattern and flow would be the same for Java. The overall flow would be similar in that you'd trigger on the client side your authorization flow, the user would choose from your allowed auth providers, Firebase would return the JWT token to your front-end script, you would send that token to your backend where you would decode it using the Firebase certificates and exchange it for your auth tokens.

From that tutorial, the client-side HTML and Javascript would be identical for you. You would just need to recreate the backend logic for Java.

Again, the automatic scaling instances would work just fine for you.

Upvotes: 1

Related Questions