mercredi 27 janvier 2016

Google Sign-In button doesn't show up

I tried to add Google Sing-In button to my website, but the button doesn't show up. I was following these instructions:

http://ift.tt/1DSdwfV

Firstly I added reCAPTCHA button and it is working fine.

Here is my login.php page:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Login</title>
<link rel="stylesheet" href="css/style.css" />

<script src='http://ift.tt/1xQsaAf'></script>

<script src="http://ift.tt/1bMh26W" async defer></script>
<meta name="google-signin-client_id" content="[Generated Client ID]">

<script>
function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile();
  console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail());
}
</script>
</head>
<body>

<div class="form">
<h1>Log In</h1>
<form name="login" action="login_post.php" method="post">
    <input type="text" name="username" placeholder="Username" required />
    <input type="password" name="password" placeholder="Password" required />
    <div class="[reCAPTCHA ID]"></div>
    <input name="submit" type="submit" value="Login" />
</form>
<p>Not registered yet? <a href='registration.php'>Register Here</a></p>
</div>

<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html> 

Do you have any ideas?




Aucun commentaire:

Enregistrer un commentaire