Integration with Firebase for Authentication
suggest changeIntroduction
Replace the placeholder strings with your Firebase app values. Call initializeApp once. email, password, and onLoginSuccess belong to the component that collects the credentials.
import firebase from 'firebase';
firebase.initializeApp({
apiKey: "yourAPIKey",
authDomain: "authDomainName",
databaseURL: "yourDomainBaseURL",
projectId: "yourProjectID",
storageBucket: "storageBucketValue",
messagingSenderId: "senderIdValue"
});
class Login extends Component {
componentWillMount() {
firebase.auth().signInWithEmailAndPassword(email, password)
.then(this.onLoginSuccess);
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents