Quantcast
Channel: Crunchify
Viewing all articles
Browse latest Browse all 1037

How to Setup Google OAuth2 Login to Discourse Forum? Google Cloud Project Verified Steps

$
0
0

How to Add Sign in With Google Option to Discourse Forum

We have recently launched Crunchify forum at http://forums.crunchify.com powered by Discourse.org.

Immediately after setup, the first thing I wanted to do is to provide Google Single sign on option with OAuth2. I’ve just completed all detailed steps and would like to share with all my readers. If you have below two questions then you are at right place 🙂

  • Configuring Google login for Discourse
  • Login to Discourse with custom Oauth2 provider

Let’s get started:

Step-1

Create Google Cloud Project - Crunchify Tips

Provide Google Cloud Project Name and ID - Crunchify Tips

Step-2

  • Click on API manager from Sidebar
  • Click on Credentials
  • Click on Create Credentials
  • Click on OAuth Client ID

Click On Credential and Create Credentials - Choose OAuth Client ID

Step-3

  • Click on Configure Consent Screen (for 1st time user)
  • Fill out form and provide all detailed information

Click on Configure Concent Screen - Crunchify Tips

Provide all Detailed information about discourse Forum

Step-4

  • Click on Web application
  • Provide Origin URI: http://forums.crunchify.com
  • Provide Redirect URI: http://forums.crunchify.com/auth/google_oauth2/callback
  • Click on Create
  • You will see you application’s Client ID and Client Secret

Choose Web Application and provide Origin URI and Redirect URI

You will see Client ID and Client Secret - Google Cloud Crunchify Tips

Step-5

  • Now go to API Manager again
  • Enable Google+ API and Contacts API in Google Cloud Console

Enable Google+ API and Contact API in Google Cloud Console - Crunchify Tips

Step-6

  • Go to Discourse Forum
  • Under Admin -> Settings -> Login Page
  • Enable Google Oauth2 authentication
  • Provide Client ID and Client Secret
  • Save all options

Go to Discourse and Add Client ID and Secret to enable login

Step-7

  • Now click on your forums’ Sign Up button and you should see nice blue option Create new Account with Google as you see at the top of this post.
  • Once you provide Gmail UserID and Password, click on Allow button and you will be able to login to forum.

Once provide Google UserID Password - Click Allow

All above steps works with your forum if there is no HTTPS enabled. For HTTPS, some users have posted some problems which I will debug in few days and update.

The post How to Setup Google OAuth2 Login to Discourse Forum? Google Cloud Project Verified Steps appeared first on Crunchify.

Author: App Shah

Crunchify, LLC Logo


Viewing all articles
Browse latest Browse all 1037

Trending Articles