-
Notifications
You must be signed in to change notification settings - Fork 1
/
auth2.html
411 lines (256 loc) · 8.07 KB
/
auth2.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!DOCTYPE html>
<html>
<head>
<link rel="icon"
type="image/png"
href="bandipur logo transback.png">
<title>Authentication - Bandipur House</title>
<meta name="google-signin-client_id" content="310627469637-tuatmhc8jsu2cbh1qplbtit6vmcmnovp.apps.googleusercontent.com">
<meta name="viewport" content="width=device-width,;initial-scale=1.0">
<link rel="stylesheet" href="./style.css">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<style>
body {
padding-bottom: 20px;
padding-top: 40px;
padding-bottom: 100px;
font-family: Arial, Helvetica, sans-serif;
background: #e0e5ec;
color: grey;
}
h2{
color: red;
font-size: 12px;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
color: white;
text-align: center;
}
.header {
position: fixed;
right: 0;
top: 0;
width: 100%;
height : 50px;
color: white;
text-align: right;
}
.center {
margin: auto;
width: 50%;
padding: 10px;
border-radius: 10px;
}
.card {
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
width: 80%;
border-radius: 25px;
background-color: #ffffff;
}
.card:hover {
box-shadow: 0 10px 20px 0 rgba(0,0,0,0.2);
}
.container {
padding: 2px 16px;
}
.avatar {
vertical-align: middle;
width: 50px;
height: 50px;
border-radius: 50%;
}
.thing {
padding: 1rem;
width: 100%;
height: 100%;
box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11),
0 5px 15px 0 rgba(0,0,0,0.08);
background-color: #ffffff;
border-radius: 25px;
transition: border-left 300ms ease-in-out, padding-left 300ms ease-in-out;
}
.thing > :first-child {
margin-top: 0;
}
.thing > :last-child {
margin-bottom: 0;
}
.heading {
color: #fff;
}
.gg {
padding: 1.5rem;
border-radius: 25px;
transition: 1s;
width : 100%;
}
img {
border-radius: 100px;
}
</style>
</head>
<body oncontextmenu="return false" onkeydown="return false;" onmousedown="return false;">
<center>
<hr>
<center>
<table >
<tr>
<td><img style = "width: 100px;" src="https://bandipurwebteam.github.io/TelegramAuth/bandipur logo transback.png"></td>
<td>
<table>
<tr>
<td>
<h1 style = "margin : 0px;" >Bandipur House</h1>
</td>
</tr>
<tr>
<td>
Official Telegram Invitation
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
<hr>
<h2 id = "warn" style=" visibility : hidden;">Open this site only from the official website</h2>
<h6 id = "warn1" style=" visibility : hidden;">Techinical Team</h6>
<div id = "space">
<p id = "si">Sign in to Continue</p>
<div id = "sign" class="g-signin2" data-onsuccess="onSignIn"></div><div class="header"><button id = "o" onclick="signOut();">Sign out</button></div>
</div>
<div id = "s">
<div class = "card" id = "m" style="visibility : hidden; box-shadow:
-7px -7px 20px 0px #fff9,
-4px -4px 5px 0px #fff9,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001; background : #e0e5ec;" >
<h3 id = "he"></h3>
<div>
<div><img id = "imgg" class="avatar"></img></div>
<p id = "info" style = "color: black;"></p>
<div class = "card" style = "width:70%;" >
<p id = "info1">Group : </p>
</div>
<div id = "bot" style = "border : 2px, black; visibility :hidden;">
<br>
<hr>
<div>
<div style="padding: 20px">
<p style = "color: black; font-size: 12px;" id = "g">In case you haven't connected with the Group Leader of grp please contact the WebAdmin at </p>
<h5 style = "color: blue; word-wrap: break-word;" >[email protected]</h5>
<div class="card">
<p id = "tt">Official Telegram Group : </p>
<button id = "but">Telegram</button>
</div></div>
</div>
</div>
</div>
</center>
<script src="https://www.gstatic.com/firebasejs/8.6.8/firebase.js"></script>
<script id = "scrt">
document.getElementById("bot").style.visibility = "hidden";
document.getElementById("m").style.visibility = "hidden";
document.getElementById("o").style.visibility = "hidden";
var firebaseConfig = {
apiKey: "AIzaSyB-JgzYvrruZ5aVNkAUcJktNg4n6WqdtCo",
authDomain: "lof-fnunho.firebaseapp.com",
databaseURL: "https://lof-fnunho.firebaseio.com",
projectId: "lof-fnunho",
storageBucket: "lof-fnunho.appspot.com",
messagingSenderId: "174519711144",
appId: "1:174519711144:web:b7a2234ef431c7d1c5599d"
};
document.addEventListener('contextmenu', event => event.preventDefault());
if (window.name != "login-erjbewwewbewgw"){
location.replace("https://bandipurwebteam.github.io/TelegramAuth/") ;
console.clear();
console.log("You are not Supposed to use the console for security reasons");
document.getElementById("s").remove();
document.getElementById("sign").remove();
document.getElementById("o").remove();
document.getElementById("scrt").remove();
document.getElementById("si").style.visibility = "hidden";
alert1();
}
else{
document.getElementById("i").remove();
}
document.getElementById("he").innerHTML = "Signed out";
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
var flag = "f";
var link = "";
if (profile.getEmail().includes("@ds.study.iitm.ac.in")){
var head = profile.getEmail().split("@")[0];
document.getElementById("o").style.visibility = "visible";
document.getElementById('he').innerHTML = "Signed in";
document.getElementById('info').innerHTML = "";
document.getElementById('imgg').src = profile.getImageUrl();
document.getElementById('info').innerHTML = profile.getName() + " " + head;
firebase.initializeApp(firebaseConfig);
var rootRef = firebase.database().ref();
var urlRef = rootRef.child("0/" + head);
var lin = rootRef.child("1/" + head + "lin/");
urlRef.on("value", function(snapshot) {
if(snapshot.val() == null || snapshot.val() == "null"){
window.alert("Sorry, you cannot access this portal, Either you don't belong to Bandipur House or banned from using the portal. Please contact WebAdmin for more information. ");
}
else{
document.getElementById("sign").style.visibility = "hidden";
document.getElementById("si").style.visibility = "hidden";
flag = "t";
document.getElementById('info1').innerHTML = "You Belong to group : <b>" + snapshot.val() + "</b>";
document.getElementById('info1').innerHTML = "Group : <b>" + snapshot.val() + "</b>";
document.getElementById('g').innerHTML = "In case you haven't connected with the Group Leader of " + snapshot.val() + " please contact the WebAdmin at " ;
document.getElementById("bot").style.visibility = "visible";
document.getElementById("m").style.visibility = "visible";
if (flag == "t"){
lin.on("value", function(snapshot) {
document.getElementById("but").onclick = function() {
location.replace(snapshot.val()) ;
}
});
}
}
});
}
else{
window.alert("Sign in with your Student Mail...");
signOut();
}
}
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
} );
document.getElementById('test').innerHTML = "";
document.getElementById('he').innerHTML = "Signed out";
document.getElementById('info').innerHTML = "Sign in to Continue";
document.getElementById('imgg').src = '';
document.getElementById("bot").style.visibility = "hidden";
document.getElementById("m").style.visibility = "hidden";
document.getElementById("o").style.visibility = "hidden";
}
function alert1() {
document.getElementById("warn").style.visibility = "visible";
document.getElementById("warn1").style.visibility = "visible";
}
function tele() {
}
</script>
</body>
</html>