Steps to create google-sign-in-with-php
- Go to Google Developer Console and create new project.
- After creating project, get the OAuth credentials
- You can get your Client ID and your client secret key. You have to copy both keys for future use in any PHP project.
- Now, Download / Install PHP Google API client library using
composer require google/apiclient:"^2.0"
- Update your credentials in
config.php
. - Run this code, it will login/logout with google account
Refer below link for more detailed procedure
https://www.thapatechnical.com/2020/04/login-with-google-account-using-php_4.html