-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhome.html
More file actions
79 lines (66 loc) · 2.39 KB
/
Copy pathhome.html
File metadata and controls
79 lines (66 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdn.firebase.com/libs/firebaseui/2.0.0/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.0.0/firebaseui.css" />
<script>
initApp = function() {
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
console.log(user);
// User is signed in.
} else {
// User is signed out.
// alert("Don't try to hack");
console.log("Signed out.. ");
}
}, function(error) {
console.log(error);
});
};
window.addEventListener('load', function() {
initApp()
});
</script>
</head>
<body>
<script src="https://www.gstatic.com/firebasejs/4.1.1/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyBLA6sDqXwnMX6tJayM4dmYCPRzt5CW91M",
authDomain: "learntogether-a250b.firebaseapp.com",
databaseURL: "https://learntogether-a250b.firebaseio.com",
projectId: "learntogether-a250b",
storageBucket: "learntogether-a250b.appspot.com",
messagingSenderId: "3175571907"
};
firebase.initializeApp(config);
</script>
<script type="text/javascript">
// FirebaseUI config.
var uiConfig = {
signInSuccessUrl: 'login/',
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
],
// Terms of service url.
tosUrl: '<your-tos-url>'
};
// 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);
</script>
<h1>Welcome to Unilyf - Connect and Learntogether</h1>
<div id="firebaseui-auth-container"></div>
</body>
</html>