Last active
December 25, 2018 17:57
-
-
Save alexanderisora/c0cd9b4438f7e9a678124b561aeee38a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase from "firebase/app"; | |
import 'firebase/auth'; | |
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'; | |
initAuth(){ | |
var config = { | |
apiKey: "<key>", | |
authDomain: "unicorn-platform-app.firebaseapp.com", | |
databaseURL: "https://unicorn-platform-app.firebaseio.com", | |
projectId: "unicorn-platform-app", | |
storageBucket: "unicorn-platform-app.appspot.com", | |
messagingSenderId: "<senderId>" | |
}; | |
firebase.initializeApp(config); | |
firebase.auth().onAuthStateChanged(function(user) { | |
// if (user) { | |
// User is signed in and currentUser will no longer return null. | |
// } else { | |
// No user is signed in. | |
// } | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment