diff --git a/examples/with-firebase-authentication/README.md b/examples/with-firebase-authentication/README.md index 42f4abc7..0091e980 100644 --- a/examples/with-firebase-authentication/README.md +++ b/examples/with-firebase-authentication/README.md @@ -29,6 +29,7 @@ Set up firebase: - Get your authentication credentials from the Firebase console under *authentication>users>web setup*. It will include keys like `apiKey`, `authDomain` and `databaseUrl` and it goes into your project in `credentials/client.js`. - Copy the `databaseUrl` key you got in the last step into `server.js` in the corresponding line. - Back at the Firebase web console, go to *authentication>signup method* and select *Google*. +- Create a database in the "Database" tab and select the realtime database. Then go to "rules" and set up your write, read rules. Examples can be found here: https://firebase.google.com/docs/database/security/quickstart#sample-rules Install it and run: diff --git a/examples/with-firebase-authentication/pages/index.js b/examples/with-firebase-authentication/pages/index.js index b6ef3f73..b0bd0b41 100644 --- a/examples/with-firebase-authentication/pages/index.js +++ b/examples/with-firebase-authentication/pages/index.js @@ -59,6 +59,8 @@ export default class Index extends Component { firebase.database().ref('messages').on('value', snap => { const messages = snap.val() if (messages) this.setState({ messages }) + }, (error) => { + console.error(error) }) }