-
Notifications
You must be signed in to change notification settings - Fork 0
/
Email .html
107 lines (94 loc) · 3.09 KB
/
Email .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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Reset Password</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/lightslider/1.1.6/css/lightslider.min.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<link rel="shortcut icon" type="image/x-icon" href="img/logo2.png" />
<style>
body {
background-color: #eeeeee;
}
.my_card {
padding: 10px;
font-size: 1.2em;
color: #494949;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="row align-items-center justify-content-center g-0 min-vh-100">
<div class="col-lg-6">
<div class="card my_card">
<div class="mb-4">
<i class="fa fa-lock fa-4x"></i>
<h1 class="mb-1 mt-3">Forgot Password?</h1>
<p>You can reset your password here.</p>
</div>
<form>
<!-- Email -->
<div class="mb-3">
<div class="input-group mb-3">
<input
type="email"
class="form-control"
id="basic-url"
aria-describedby="basic-addon3"
placeholder="someone@example.com"
style="text-align: center"
required
/>
</div>
</div>
<!-- Button -->
<div class="mb-3">
<button type="submit" id="reset-button" class="btn btn-primary">
Send Reset Link
</button>
</div>
<span>Return to <a href="Login.html">sign in</a></span>
</form>
</div>
</div>
</div>
</div>
<script type="module" src="js/login-firebase.js"></script>
<script type="module">
import { getAuth ,sendPasswordResetEmail } from "https://www.gstatic.com/firebasejs/9.4.1/firebase-auth.js";
const auth = getAuth();
function reset() {
// alert("Reset Password Sent!");
var email = document.getElementById('basic-url').value;
sendPasswordResetEmail(auth, email)
.then(() => {
alert("Reset Password Sent!");
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.log(errorMessage);
// ..
});
}
document.getElementById('reset-button').addEventListener('click', reset, false);
</script>
</body>
</html>