How to create Google Client ID and Secret key for Google Login Button?
Posted By: Rimjhim Jain Published: 14, Jan 2024
Table of Contents
In this blog we will talk about how we can login with google in our website.
Google OAuth API allows users to login in a website with their Google credentials.
Google OAuth Prerequisites:
Create Google API project and get OAuth credentials.
Go to Google Developers Console and then follow these steps:
- Create New Project link for create new project and then Enter Project Name and click on Create button.
- Once you have created a new project then you can see your project list on web page .Click on project select box , then one modal will popup and under this, you can find a list of project, so select your project.
- Now from dashboard go to APIs overview and then from left side you have to click on OAuth consent screen.
- Once you have click on OAuth consent screen, then one page will load, here you have to choose user type according to your preference and then click on create and then define application name and after this click on save button and fill scopes and test users according to your preferences after doing all go back to dashboard.
- Then form left side choose Credentials(just above ‘OAuth consent screen’), click on Create credential button, so one drop-down menu will appear and from this, you have to select OAuth client ID.
- After click on OAuth client ID menu then you have redirected to another page, and here you can find different Application type.
- From different Application type option, you have to select Web application. Once you have select the Web application option, then one form will appear on the web page. Here you have to define Name and you have also define Authorized redirect URIs field and lastly click on Create button.
- Once you have click on create button, then you can get your Client ID and your client secret key. You have to copy both keys for future use for implementing Login using Google account.