created API For Aplication Absensi
This commit is contained in:
28
auth.html
Normal file
28
auth.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Google Login Test</title>
|
||||
<script src="https://accounts.google.com/gsi/client" async defer></script>
|
||||
<script>
|
||||
function handleCredentialResponse(response) {
|
||||
console.log("Google ID Token:", response.credential);
|
||||
|
||||
// Tampilkan token di halaman agar bisa kamu salin ke Postman
|
||||
document.getElementById("result").innerText = response.credential;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Login dengan Google</h2>
|
||||
|
||||
<div id="g_id_onload"
|
||||
data-client_id="270521628718-s79hja01mjur7ee18fkooup3fq5n96p9.apps.googleusercontent.com"
|
||||
data-callback="handleCredentialResponse">
|
||||
</div>
|
||||
|
||||
<div class="g_id_signin" data-type="standard"></div>
|
||||
|
||||
<h3>Google Token (id_token):</h3>
|
||||
<pre id="result" style="background:#f0f0f0;padding:10px;"></pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user