I am using Serverless framework (aws Lambda functions) but I want the authentication to be done by firebase. Is it possible to integrate this two?
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.
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.
Amazon has its own authentication service integrated with AWS that's called Cognito:
This is usually the first choice of handling authentication, since if you're using AWS Lambda then you already have Cognito available with no additional services needed, but there is nothing to stop you from using any other authentication service like Firebase Authentication, Auth0, Stormpath, Okta etc. This may be an advantage for you if you're already using it, you have users there etc. It's marginally more complicated that Cognito (if you're using AWS) because you need to handle additional API credentials.
So the answer to your question "Can I integrate firebase authentication with aws lambda" is yes, you can. But you do it on the application level in your code, not in the AWS admin console. You do it very similarly like you would do with any traditional backend framework, like Express, Hapi, Restify etc. but using the Serverless framework.
And just like with other frameworks, it depends whether you want to do the authentication server-side or client-side.
For server-side solutions there are:
The client-side authentication is explained at:
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