Create CLIENT_ID and CLIENT_SECRET in Google (Beginners Guide) - thedawnsoft

 Create CLIENT_ID and CLIENT_SECRET in Google (Beginners Guide)



You may need CLIENT_ID and CLIENT_SECRET for multiple purposes like while integrating Sign in with Google or many other purposes. This blog will teach you to create CLIENT_ID and CLIENT_SECRET. 


Follow these steps:

Go to the link ==> https://console.cloud.google.com/apis/dashboard 


Welcome to GCP:

Welcome GCP


Agree the Google Terms of Service and Email updates section is optional. Now click the AGREE AND CONTINUE button in the bottom-left corner.


GCP APIs & Services


In the dashboard, you can see your projects if you already have, or you can simply create a new project. 


Create New Project:


GCP new project

Now your new project will be created. Your new dashboard will look like this.


GCP create credentials


Go to the Credentials section.


Create credentials Google


Now, click on the CREATE CREDENTIALS you will be prompted to select the options.


Select OAuth Client ID

Select OAuth client ID.


Configure Consent Screen

Configure Consent Screen:

To create an OAuth client ID, you must first set a product name on the consent screen. To configure click on the CONFIGURE CONSENT SCREEN button.



OAuth consent screen user type


Select External, and click the CREATE button.


OAuth App register


developer contact info


Both above images are on the same page. After entering the required parameters click the SAVE AND CONTINUE button. After this you will see the similar pages, there are no required parameters so you don’t have to enter any, just click on the SAVE AND CONTINUE button. 


After you finish the consent screen information, go to the Credentials page again.


Now you have to follow the previous steps again. Click on the CREATE CREDENTIALS button and click OAuth client ID button. 


Create OAuth Client ID:


Here we are creating CLIENT_ID and CLIENT_SECRET for web application. Select Web Applications from options. 


create OAuth client ID


create OAuth client ID



Below to the same screen. Add Authorized JavaScript origins, Click ADD URI and enter your host url, http://127.0.0.1:3000 or http://localhost:3000 . Also add Authorized redirect URIs, click ADD URI and enter redirect URI, http://127.0.0.1:3000/api/auth/google


create OAuth client ID set authorize origins


Now click on the CREATE button. Your OAuth client will be created now. You will see the below screen.


OAuth client ID and secret created



These are the Client ID and Client Secret which are used for multiple purposes. 



Post a Comment

Previous Post Next Post