Hello everyone,
I'm running into a persistent issue while trying to secure my backend with Google Cloud API Gateway and Firebase Authentication, and I feel like I'm running in circles. I'm hoping someone in the community has encountered this specific scenario.
Backend: Firebase Cloud Functions (onRequest, located in europe-west3)
Goal: Route all my Cloud Function calls through a Google Cloud API Gateway to get a single, professional endpoint and add a layer of security (DDoS protection, etc.).
The Configuration:
I've set up an API Gateway in europe-west1.
I've created an openapi-spec.yaml to route a test endpoint (/deleteCheckIn) to the corresponding Cloud Function.
The gateway security is configured to require a valid Firebase Auth ID Token using securityDefinitions.
The Problem:
My FlutterFlow app calls the gateway endpoint (e.g., https://api.my-project.com/deleteCheckIn). Before making the call, I get the user's ID token via await currentUser.getIdToken(true) and pass it in the Authorization: Bearer <token> header.
However, the call consistently fails at the gateway, and I receive one of two errors depending on my openapi-spec.yaml configuration.