Here’s how to configure Discourse to allow login and registration with Google OAuth2.
Go to https://console.developers.google.com and create a new Project.
(This can take a while, so wait a minute as needed for it to appear.)
Select Credentials in the left menu, and OAuth client ID type for the credentials.
Configure your OAuth Consent Screen. Fill as appropriate; we recommend populating all these fields, then click Save.
https://. In the Authorized Redirect URI section, add the base url with
/auth/google_oauth2/callback. Click the Create button.
The OAuth client dialog will appear with client ID and secret.
Click Library in the left menu and you’ll see a huge list of Google API’s. Find Google+ API and enable it:
In your Discourse site settings, check “enable google oauth2 logins”, and fill in your
google oauth2 client id and
google auth2 client secret provided earlier.
That’s it, Google login should now work on your Discourse! Go ahead and test it out with any Google account.