Step by step guide to create OAuth Credentials in the google developer console

This small guide walks you through the steps to create OAuth credentials in the Google Developer Console for use with a web application.

This short walkthrough is part of the post Strapi authentication via Google Provider with React and describes how to create a Client ID and Secret for OAuth authentication via Google.

We need to head over to console.developers.google.com.

Google Developer Console

and create a new project

Google Developer Console Create New Project

Google Developer Console Create New Project

On the credentials screen of our new project we are promted to Configure Consent Screen, we need to do this before we can create our credentials:

Credentials Screen

Set the OAuth Screen as External (if you want it to be used by external users).

OAuth Screen configuration User Type External

And Configure the OAuth Consent Screen:

OAuth Screen configuration

Now we can finally create the credentials. Create Credentials

In the Menu choose _ OAuth Client ID_ and an application type of Web Application.

On the final screen it is important to set the correct redirect URI: http://localhost:1337/connect/google/callback.

<!-- ![Set redirect URI](/images/blog-posts/create-google-oauth-credentials/set_redirect_url.png) -->

And we will finally receive our credentials. Save the Client ID and the Client Secret somewhere.

<!-- ![Credentials](/images/blog-posts/create-google-oauth-credentials/credentials.png) -->