How to get user email using Google Identity Services SDK in html & javascript

Viewed 80

I am trying to use Google Identity Services SDK for sign in. How can I get a user's email? I have been searching the web, but couldn't find anything...

<!DOCTYPE html>

<html>
<head>
    <title>Signin Test</title>

</head>

<style>
</style>

<body>
        <script src="https://accounts.google.com/gsi/client" async defer></script>
    <div id="g_id_onload"
         data-client_id="My ID"
         data-callback="handleCredentialResponse"
         data-auto_prompt="false">
    </div>
    <div class="g_id_signin" data-type="standard"></div>

    <script>

    </script>
</body>
</html>

0 Answers
Related