Update templates/login.html
Browse files- templates/login.html +18 -1
templates/login.html
CHANGED
@@ -4,6 +4,8 @@
|
|
4 |
<title>Login</title>
|
5 |
|
6 |
<link rel="stylesheet" type="text/css" href="/static/style2.css">
|
|
|
|
|
7 |
</head>
|
8 |
<body>
|
9 |
<footer>
|
@@ -33,7 +35,21 @@
|
|
33 |
<br>
|
34 |
<button type="submit">Login</button>
|
35 |
</form>
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
38 |
<script>
|
39 |
function setRecaptchaToken(token) {
|
@@ -52,5 +68,6 @@
|
|
52 |
// reCAPTCHA validation will be handled automatically by Google's script
|
53 |
});
|
54 |
</script>
|
|
|
55 |
</body>
|
56 |
</html>
|
|
|
4 |
<title>Login</title>
|
5 |
|
6 |
<link rel="stylesheet" type="text/css" href="/static/style2.css">
|
7 |
+
<script src="https://apis.google.com/js/platform.js" async defer></script> <!-- Google Platform Library -->
|
8 |
+
<meta name="google-signin-client_id" content="YOUR_CLIENT_ID.apps.googleusercontent.com"> <!-- Replace with your Client ID -->
|
9 |
</head>
|
10 |
<body>
|
11 |
<footer>
|
|
|
35 |
<br>
|
36 |
<button type="submit">Login</button>
|
37 |
</form>
|
38 |
+
<!-- Google Sign-in Button -->
|
39 |
+
<div class="g-signin2" data-onsuccess="onSignIn"></div>
|
40 |
+
|
41 |
+
<script>
|
42 |
+
function onSignIn(googleUser) {
|
43 |
+
// Get the Google user profile information
|
44 |
+
var profile = googleUser.getBasicProfile();
|
45 |
+
|
46 |
+
// You can now send this information to your server if needed
|
47 |
+
// ...
|
48 |
+
|
49 |
+
// Or simply redirect the user to a dashboard or home page
|
50 |
+
}
|
51 |
+
</script>
|
52 |
+
|
53 |
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
54 |
<script>
|
55 |
function setRecaptchaToken(token) {
|
|
|
68 |
// reCAPTCHA validation will be handled automatically by Google's script
|
69 |
});
|
70 |
</script>
|
71 |
+
</div>
|
72 |
</body>
|
73 |
</html>
|