Skip to content

Instantly share code, notes, and snippets.

@alexanderisora
Last active December 25, 2018 17:57
Show Gist options
  • Save alexanderisora/c0cd9b4438f7e9a678124b561aeee38a to your computer and use it in GitHub Desktop.
Save alexanderisora/c0cd9b4438f7e9a678124b561aeee38a to your computer and use it in GitHub Desktop.
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