Giter VIP home page Giter VIP logo

firebase-functions-api's Introduction

Firebase - Basic API

Presentation

This project is using Node.js with Firebase to deploy Cloud functions as an API.

Stack

Features

  • Basic authentification actions : login, signup, signout (with a password, Facebook and Google).
  • Save the users in Cloud Firestone with a profile and credential document.
  • Different functions to manage a user (update the profile, update the password, ask for resetting the password).
  • Control the requests by the headers (authentification token verification).
  • Possibility to send emails with nodemailer.

Quick Start

# Install dependencies
npm install

# Log in to firebase account
node_modules/.bin/firebase login

# Choose a firebase project
node_modules/.bin/firebase use <project_id>

# Test locally
npm run serve

# Deploy to firebase
npm run deploy

Configuration

  • Firebase configuration :
    • Log in to your firebase account with the command node_modules/.bin/firebase login.
    • Update the file .firebaserc with your own firebase projects id. You can get them using node_modules/.bin/firebase projects:list.
    • Set your project's credentials in /config/credential.js (https://firebase.google.com/docs/web/setup#config-object) and your service account key in /config/service-account.json (from the settings of the Firebase project)
  • Modules :
    • Email (/modules/email):
      • Set your own transport config in config.js.
      • Set the DKIM keys in the folder certificates: go to https://dkimcore.org/tools/keys.html and follow instructions specified in https://caillaud.fr/phpmailer-envoyer-mails-signes-dkim/ to set yours.
      • Go to your domain configuration and add a new DNS record with subdomain <selector>._domainkey (don't forget to modify the selector name in the public key in case of custom selector). The selector is specified in the public key format at the beginning : <selector>.<subdomain>.<domain>.<extension>.. To complete the DNS record, complete the public key with the previous key generated.
      • You can set your own custom email templates in the folder templates.

firebase-functions-api's People

Contributors

mxjoly avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.