Most of the website we want to allow user to login using google account then store google information in your system, this is you can do easily . This is simple demo code . First configure your project from this url:

https://developers.google.com/identity/sign-in/web/sign-in

Which url you use in configure project then you need to upload this file in same domain like you use techparkbd.com then you need to upload techparkbd any folder

When done then just replace your project client id. This is full code

<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="YOUR_CLIENT_ID.apps.googleusercontent.com">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- YOUR_CLIENT_ID replace it using your project id -->
<div align="center">
    <div class="g-signin2" data-onsuccess="onSignIn" data-onfailure="onSignInFailure"
         data-theme="dark"></div>
</div>

<script src="https://code.jquery.com/jquery-1.11.2.min.js"
        integrity="sha256-Ls0pXSlb7AYs7evhd+VLnWsZ/AqEHcXBeMZUycz/CcA=" crossorigin="anonymous"></script>

<script src="https://apis.google.com/js/platform.js?onload=onLoadCallback" async defer></script>

<script>

    $.signIn = false;

    $(function () {

        $(".g-signin2").click(function () {
            $.signIn = true;
        });
    });

    function onSignIn(googleUser) {

        var profile = googleUser.getBasicProfile();

        var profile_id = profile.getId();
        var profile_name = profile.getName();
        var profile_email =  profile.getEmail();
        var profile_image =  profile.getImageUrl();

// this is code which store google account information after success so if you not store information then remove this 
        if ($.signIn) {
            var id_token = googleUser.getAuthResponse().id_token;
            $.ajax({
                type: "POST",
                url: "gmail_user_login.php",
                data: {id_token:id_token,profile_id:profile_id,profile_name:profile_name,profile_email:profile_email,profile_image:profile_image},
                dataType: "text",
                success: function (response) {
                   window.location.reload();
                }
            });
        }

    }

    function onSignInFailure() {
        // Handle sign-in errors
        console.log("failed");
    }

</script>

if you face any problem then please inform me, i will try help you.

Comment