I will explain my use case. I have a web app. First, the app attempts to login to firebase and it gets back a token. I want to use the token issued by firebase to access lambda function through api gateway. Is there a mechanism to validate Firebase tokens in AWS ApiGateway?
With Firebase consisting of proprietary services, APIs, and an SDK, a migration to AWS requires application refactoring – introducing a new architecture using AWS services, and rewriting parts of the codebase to use them accordingly.
For a Lambda authorizer of the REQUEST type, API Gateway passes request parameters to the authorizer Lambda function as part of the event object. The request parameters include headers, path parameters, query string parameters, stage variables, and some of request context variables.
You have to write custom Authorizers lambda function for validate your firebase tokens.
This lambda function hit before execute your lambda function.
following diagram explain how it's work
For write custom Authorizers function follow this reference. For token validation you can use firebase sdk and its references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With