I am developing an application on Google App Engine. I use Cloud Endpoints to communicate between an Android application on my backend in Google App Engine. The Android client uses Firebase Authentication and sends a Firebase token to Cloud Endpoints with each call.
In the Google App Engine, I use the following code to verify the Firebase token. I am using Firebase Admin SDK 4.0.3
Task<FirebaseToken> authTask = FirebaseAuth.getInstance().verifyIdToken(token);
try {
Tasks.await(authTask);
} catch (ExecutionException | InterruptedException e ) {
log.severe(e.getMessage());
}
FirebaseToken decodedToken = authTask.getResult();
The task is performed as part of the Back App task for the Google App Engine, but, unfortunately, this Backend instance does not complete, and therefore I have exceeded the free quota limit. So can anyone give me a hint how can I shut down the Backend Instance after checking the token?