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.
and create a 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:
Set the OAuth Screen as External (if you want it to be used by external users).
And Configure the OAuth Consent Screen:
Now we can finally create the 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) -->