tra-analysis/website/public/scripts.js

40 lines
1.5 KiB
JavaScript
Raw Permalink Normal View History

2019-01-06 18:54:08 +00:00
// Initialize Firebase
var config = {
apiKey: "(insert the TitanScout Api Key Here)",
2019-01-06 18:54:08 +00:00
authDomain: "titanscoutandroid.firebaseapp.com",
databaseURL: "https://titanscoutandroid.firebaseio.com",
projectId: "titanscoutandroid",
storageBucket: "titanscoutandroid.appspot.com",
messagingSenderId: "1097635313476"
};
firebase.initializeApp(config);
// FirebaseUI config.
var uiConfig = {
2019-02-09 20:30:58 +00:00
signInSuccessUrl: 'profile',
2019-01-06 18:54:08 +00:00
signInOptions: [
// Leave the lines as is for the providers you want to offer your users.
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
//firebase.auth.FacebookAuthProvider.PROVIDER_ID,
//firebase.auth.TwitterAuthProvider.PROVIDER_ID,
firebase.auth.GithubAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID,
firebase.auth.PhoneAuthProvider.PROVIDER_ID,
2019-02-06 20:51:31 +00:00
// firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID
2019-01-06 18:54:08 +00:00
],
// tosUrl and privacyPolicyUrl accept either url string or a callback
// function.
// Terms of service url/callback.
2019-02-06 20:51:31 +00:00
tosUrl: function() {
2019-03-08 02:13:32 +00:00
alert("this is a test app. don't use it. If you are a 2022 captian, you agree to name Jacob Levine as your successor.");
2019-02-06 20:51:31 +00:00
},
2019-01-06 18:54:08 +00:00
// Privacy policy url/callback.
privacyPolicyUrl: function() {
alert("we will steal all of the data");
}
};
2019-02-09 20:00:50 +00:00
// Initialize the FirebaseUI Widget using Firebase.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
// The start method will wait until the DOM is loaded.
ui.start('#firebaseui-auth-container', uiConfig);