Coder Social home page Coder Social logo

firebase-webhooks's Introduction

Firebase currently does not have support for webhooks. This project is an attempt to fill that gap.

Using Firebase webhooks

  1. Log in to the dashboard using your GitHub account.
  2. Use the form provided to add a webhook for the Firebase URL and event you'd like to listen on.
  3. Optionally provide a custom authentication token or Firebase Secret if the data at the provided path is not publicly readable.
  4. Fill in a payload URL which we can POST data to.

At your payload URL, you should start receiving POST requests with a JSON body that looks like this:

{
	"event": {
		"ref": "The Firebase URL you provided to create this webhook.",
		"type": "The Firebase event you're listening on for this webhook."
	},
	"ref": "The Firebase URL for this DataSnapshot.",
	"key": "The key() of this DataSnapshot.",
	"previous": "The previous child key emitted before this DataSnapshot.",
	"value": "The exportVal() for this DataSnapshot."
}

Please note that updates may be sent again if the listening server is changed and needs to be redeployed.

Disclaimer

This is a plaything. It may or may not send duplicate updates or none at all. It may or may not fall over. It may or may not hammer your server. Use with caution!

Contributing

I'd love some help in making this a bit more robust and stable so that I feel comfortable removing the disclaimer above.

TODO

  • validate form input (e.g. make sure URLs are URLs)
  • add tests for dashboard
  • add tests for webhook server/listeners
  • add throttling/rate limiting
  • stop webhook on hard failure (e.g. new Firebase() exceptions)
  • stop/pause webhook after x failed requests
  • log all webhook requests/responses for debugging

firebase-webhooks's People

Contributors

holic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.