Skip to content

Synchronization

Ondřej Žára edited this page Sep 23, 2013 · 7 revisions

The Firebase module provides synchronization with a remote DB backend; this allows a presentation to be controlled remotely (slave), to remotely control others (master) or both at once.

Setting this up is pretty easy and straightforward. You will need to perform these steps:

  • Get a Firebase account. There is no need to register one; you can login with an existing GitHub account
  • Configure the Firebase module:
Slides.modules.firebase = {
	url: "https://youraccount.firebaseio.com/slides",
	write: true
}
  • The write: true option causes this presentation to act as a master, propagating local slide changes to the remote database. If you want a presentation to act as a slave, specify write: false instead.

Security

You will probably want to restrict the database access so only certain users are allowed to modify it (you do not want any fellow hackers to control your presentation, right?). To make this happen:

  1. Modify the security rules of your Firebase as follows:
{
  "rules": {
    ".read": true,
    "slides": {
      ".write": "auth.username == 'youruser'"
    }
  }
}
  1. Specify the desired authentication method in the Firebase module config:
Slides.modules.firebase.auth = "github";

For a list of available authentication methods, please check the Firebase documentation.

Clone this wiki locally