Last active
July 10, 2019 21:37
-
-
Save TKAB/db5956fdfb31a48336433c89f3f677c4 to your computer and use it in GitHub Desktop.
Importing firebaseui
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
/*global firebaseui*/ | |
/*global firebase*/ | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import 'bootstrap/dist/css/bootstrap.css'; | |
import 'bootstrap/dist/css/bootstrap-theme.css'; | |
import './index.css'; | |
// import * as firebase from 'firebase'; | |
// Initialize Firebase | |
var config = { | |
apiKey: "REMOVED", | |
authDomain: "REMOVED", | |
databaseURL: "REMOVED", | |
storageBucket: "REMOVED", | |
messagingSenderId: "REMOVED" | |
}; | |
firebase.initializeApp(config); | |
const firebaseui = global.firebaseui; | |
const authUi = new firebaseui.auth.AuthUI(firebase.auth()); | |
var uiConfig = { | |
'signInSuccessUrl': './', | |
'signInOptions': [ | |
// Leave the lines as is for the providers you want to offer your users. | |
firebase.auth.EmailAuthProvider.PROVIDER_ID | |
], | |
// Terms of service url. | |
'tosUrl': './terms.html', | |
}; | |
// The start method will wait until the DOM is loaded. | |
authUi.start('#firebaseui-auth-container', uiConfig); | |
ReactDOM.render( | |
<App />, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment