From b0b449abb30b185de7053d787722be0edcefcbe2 Mon Sep 17 00:00:00 2001 From: wildscotsmen Date: Wed, 14 Nov 2018 11:51:59 -0500 Subject: [PATCH] Added security to Firebase in application. --- src/firebase.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/firebase.js b/src/firebase.js index 6e6b6b2..7f85d2a 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -1,6 +1,7 @@ import firebase from 'firebase/app'; import 'firebase/database'; import 'firebase/storage'; +import 'firebase/auth'; const config = { apiKey: "AIzaSyAYf9AbeYwLY892NRiQfn0AMtG9xIFAJbo", @@ -13,4 +14,11 @@ const config = { firebase.initializeApp(config); +firebase.auth().signInAnonymously().catch(error => { + var errorCode = error.code; + var errorMessage = error.message; + + console.log(errorCode + " - " + errorMessage); +}); + export default firebase; \ No newline at end of file