Skip to content

In this tutorial you are going to learn how to implement Google OAuth login with your website. PHP Google OAuth API allows users to login in a website with their Google credentials.

Notifications You must be signed in to change notification settings

ninja-developer-13/google-login-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-login-php

In this tutorial you will learn How to Implement Google Login API in PHP. Create Google API Console Project

1.Go to Google Console https://console.developers.google.com/

2.Create New Project to a new project.

Enter your project name
Under the project name, creates a project ID. It must be unique Id.
Then click on the create button and your project will be created.

3.Select Credentials under the apis & service section

Select Credentials and click on create credentials and select oauth client ID
In the Application type section, select Web application.
In the Authorized redirect URIs field, enter the redirect URL.
Click the Create button.

A dialog box will appear with Client ID and Client secret. This Client ID and Client secret allow you to access the Google APIs.

4.Select Oauth Consent and specify below.

In App name field, enter the name of your application
enter email in the support email field.
upload your app logo
add your domain into app domain, application home page, application privacy policy
Enter your developer contact information

5.Install google api client library using below command

composer require google/apiclient:"^2.0"

Blog: https://sleepy-coder.blogspot.com/2020/12/login-with-google-oauth-using-php.html

About

In this tutorial you are going to learn how to implement Google OAuth login with your website. PHP Google OAuth API allows users to login in a website with their Google credentials.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages