-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecker.php
67 lines (54 loc) · 1.18 KB
/
checker.php
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
<?php
session_start();
require "Authenticator.php";
if ($_SERVER['REQUEST_METHOD'] != "POST") {
header("location: valida.php");
die();
}
$Authenticator = new Authenticator();
$checkResult = $Authenticator->verifyCode($_SESSION['auth_secret'], $_POST['code'], 2); // 2 = 2*30sec clock tolerance
if (!$checkResult) {
$_SESSION['failed'] = true;
header("location: valida.php");
die();
}
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Autenticação concluida!</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
}
body {
display: flex;
font-size: 50px;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(120deg, #00001F, #17F2AD);
transition: 0,5s;
}
.whitecampo {
display: flex;
justify-content: center;
background: #fff;
padding: 15px;
}
.titulo {
align-items: center;
}
</style>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="whitecampo">
<p class="titulo">Autenticação concluida com sucesso.</p>
</div>
</body>
</html>