Open arzonus opened 1 year ago
In https://pkg.go.dev/firebase.google.com/go/v4/auth#Client.VerifyIDToken
In non-emulator mode, this function does not make any RPC calls most of the time. The only time it makes an RPC call is when Google public keys need to be refreshed. These keys get cached up to 24 hours, and therefore the RPC overhead gets amortized over many invocations of this function.
This might mean that in emulator mode it is expected that it does RPC calls. I don't see a reason it should call the auth server since the JWT token contains the data.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
I am working on functionality using AdminSDK to verify ID tokens by the
VerifyIDToken
function. I would like to write tests including calls of the method, but I found that the SDK tries to call a Firebase Emulator, which host is defined byFIREBASE_AUTH_EMULATOR_HOST
variable.I was surprised because I was sure
VerifyIDToken
shouldn't call the emulator to check user revocation. I found the place where the problem happens. Could you please describe the reason for this behavior or help me to avoid calls to the emulator?Relevant Code:
I get this error
Thank you!