Categories: PHP

Login with Google Account using PHP

Google OAuth API provides a simple and powerful thanks to integrate the login system on the web site.

Google Login API permits the user to sign into web site|the web site} using their Google account while not sign on thereon website.

Google login system positively helps to extend the subscribers on your web siteas a result of these days most users have a Google account and that they will log in with their Google account while not registration on your web site.

If You Want to Login with google Account then Just Follow below Step:

Steps:

1. Login With A google account like open gmail 

2. Go to the Google API Console.

3.Click On new project


a. make your project name and click on create button wait for sec.
select your project if you have multiple project then enable api

4. then you see below image like webpage

5.  click on library then search google+api


6.click on them and then enable it


7. create credentials


8. choose
a. google+ Api
b. web browser
c. click on user data
and click on what credentials button


9. after click you saw a popup
now click on set up consent screen
then you will redirect to below image webpage


10. Type application name which you want and add Authorised domain name and just save them


11. create credentials


12. click on OAuth client ID and choose web Application


13. just see below image and follow them carefully


14. click on create button
15. after create you will see a popup where you see client Id And Client secret

16. click on credentials like below image


17. click on name (web client1 in my case)
18. download json file

19. put downloaded json file inside your google folder where you see client_credentials.json file replace all code of these file with your downloaded json code.

20. and download these Zip file 

Basant

Recent Posts

How to Center submit button of wpForm

You must navigate to Settings » General first. Add wpf-center to the Form CSS Class…

8 months ago

How to add Marquee on any website wordpress,PHP,HTML,eBlogger ?

if you want to add marquee on any website (wordpress,PHP,HTML,Blogger). you just need to follow…

8 months ago

How to Autoplay and Loop YouTube Videos in WordPress

First Method: Use below code to play youtube video in loop and most important is…

1 year ago

How to Disable WP JSON Rest API in WordPress without plugin ?

just add below code in wordpress theme function.php file at the bottom -------------------------------------------------- Add the…

1 year ago