Open nohe427 opened 1 year ago
We should likely document that callable functions should not be used when exchanging attestation tokens for app check tokens or we should add in some checks that getToken can do to firebase callable functions to make sure that folks do not accidentally do this.
@nohe427 in sendToServerTask
are you using what URL you are sending your token too is it your own server or google services like exchangePlayIntegrityToken
? What does private const val URL = "MY-FUNCTION-URL"
MY-FUNCTION-URL points too?
@rajatbeck - Its my own Google Cloud Function that I created.
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
What happened? How can we make the problem occur?
When using callable functions to exchange integrity verdicts for App Check tokens, the getToken() call gets called a bunch until the underlying attestation provider quota is exhausted. When the quota is exhausted, the first request does return a valid App Check token, but we quickly exhaust the App Check quota to exchange tokens as well.
Relevant Code:
Server Code
I can also demo for you if you are interested.