A Node.js application that wraps around Firebase to handle email actions,
218
A minimal Node.js application that wraps Firebase Authentication to handle email actions like password reset, email verification, and email recovery. Built with Express.js and Firebase, this app automates the process of handling these emails, saving time and effort in any Firebase-related projects.
This app automates the handling of Firebase email actions (like password reset or email verification).
If you prefer not to set up your own server, you can use the hosted version. Just follow these steps:
Create a Firebase Project
Enable Email/Password Authentication
Add Your Node.js App URL to Firebase
Update Action URL in Firebase Console
https://your-nodejs-hosting-url/__/auth/action
Once your Node.js app is up and running, you need to configure the Firebase authentication to redirect users to this app for email actions.
Firebase Initialization Initialize Firebase in your frontend application. You can follow the Firebase documentation for this.
Set Email Action URL in Firebase In your frontend code, you only need to set the Firebase email action URLs to point to your Node.js app:
const actionCodeSettings = {
url: "https://your-nodejs-hosting-url", // Replace with your hosted Node.js app URL
};
Example Snippet
You can use the example snippet provided in the example-snippets folder to get an idea of how it should work.
To install and run the app locally, follow these steps:
Clone the Repo:
$ git clone https://github.com/samay15jan/firebase-email-handler
Install Dependencies:
$ cd firebase-email-handler && npm install
Run the App:
$ npm start
You can also deploy your own instance of the app by running it in a Docker container. Here's how:
Clone the Repo
$ git clone https://github.com/samay15jan/firebase-email-handler
Build the Docker Image
$ cd firebase-email-handler
$ docker build -t firebase-email-handler .
Push to Docker Hub (Optional)
If you'd like to share your image, you can push it to Docker Hub which is easy if u want to host it later:
$ docker push your-dockerhub-username/firebase-email-handler
You can run the app locally or on your cloud provider (e.g., Google Cloud, Azure, or Render):
$ docker run -p 3000:3000 firebase-email-handler
Content type
Image
Digest
sha256:dec5622b1…
Size
417.1 MB
Last updated
almost 2 years ago
docker pull samay15jan/firebase-email-handler:9fb191d9cdbd9981bfd4386ef3bbe876653f7a1d