Here’s how to configure Google Console to allow login and registration with Google OAuth2. You’ll need this for both:
Go to https://console.developers.google.com and create a new Project. When you submit the new project, you’ll see a page that still says that you have no projects. Just wait for about a minute and the project will appear.
In the new project, in the menu on the left, click “APIs & auth” > Credentials. Click the “Create New Client ID” button on the right side.
https://. In the Authorized Redirect URI section, add the base url with
/auth/google_oauth2/callback. Click the Create Client ID button.
After some time, the web application will appear with its client ID and secret.
Under “APIs & auth” > APIs, you’ll see a huge list. Find “Contacts API” and “Google+ API”. Enable both of them.
In the “APIs & auth” > “Consent screen” section, edit the product name.
In your plugin settings, fill in your client id and client secret from step 4.
If you’re using SSL and are getting errors when authenticating with Google OAuth2, see this topic.