Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.