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:
Agree the Google Terms of Service and Email updates section is optional. Now click the AGREE AND CONTINUE button in the bottom-left corner.
In the dashboard, you can see your projects if you already have, or you can simply create a new project.
Create New Project:
Now your new project will be created. Your new dashboard will look like this.
Go to the Credentials section.
Now, click on the CREATE CREDENTIALS you will be prompted to select the options.
Select OAuth client ID.
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.
Select External, and click the CREATE button.
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.
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.
Now click on the CREATE button. Your OAuth client will be created now. You will see the below screen.
These are the Client ID and Client Secret which are used for multiple purposes.