Reputation: 47
This is my setup
Multiple Python APIs hosted on App Engine Angular client application hosted on Firebase. Users accessing the web application are authenticated by Firebase Auth.
When trying to send requests to the APIs hosted on App Engine from the application, an error is encountered.
401 Unauthorized: Invalid IAP credentials: empty token
Tried following multiple online articles but there were a few problems I discovered.
Is there any way I can use a service account to programmatically authenticate my Firebase web app as a secure IAP user and access the APIs?
Upvotes: 2
Views: 1324
Reputation: 6263
Haven't tried this...
You can programmatically make calls to an IAP secured endpoint using an OIDC token. See documentation
So maybe your flow should be -
a) Users login to your Firebase App (follow whatever authentication method you like).
b) Then you programmatically make calls to the IAP app (following the link above) on behalf of the users
Upvotes: 1