-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (30 loc) · 1 KB
/
index.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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Página Google aberta 24 horas</title>
</head>
<body>
<iframe src="https://www.google.com.br/" frameborder="0" width="100%" height="100%"></iframe>
<script>
function login() {
// Inicie o processo de login.
const auth2 = new google.auth.GoogleAuth();
auth2.signIn();
// Aguarde o usuário fazer login.
auth2.then(function(authResult) {
// Obtenha o token de acesso.
const token = authResult.access_token;
// Faça login na sua conta do Google.
const xhr = new XMLHttpRequest();
xhr.open("POST", "https://www.google.com/accounts/o8/signin/challenge?source=embedded");
xhr.setRequestHeader("Authorization", "Bearer " + token);
xhr.send();
});
}
{
// Insira o código para fazer login na sua conta do Google aqui.
}
document.querySelector(".btn-login").addEventListener("click", login);
</script>
</body>
</html>