Third-party features and integrations: Google Single Sign On (SSO)
-
Enabling Google SSO requires that you have a Google account of your own. You will also need to restart your forum a couple of times to activate Google SSO for your users.
Install and activate plugin
- Open the administrative dashboard.
- Plugins > Install Plugins menu.
- Select the Find Plugins tab, and search for Google. There are number of different Google-related plugins, so scroll down the list until you see the SSO plugin -- select Install when you see it.
- From Installed tab on the Plugins menu, search again and select Activate.
- Activating the plugin will require a restart of your forum. Select the Dashboard menu and press the Restart button to the right. After NodeBB restarts, the Google SSO plugin will be active.
- Refresh your browser to reveal the Social Authentication menu -- select this menu, and then select Google.
Enable Google SSO
Authenticate your forum in the Google API console, which is linked from this page. Before opening the Google console, select and copy the text /auth/google/callback without the single quotes. You'll need this info later to link Google SSO with your forum.
- Follow the Google SSO link.
- Accept the terms of use.
- Look for the Google+ API link, which you should find under the Social APIs menu. Click on this link, and then click Enable to the right of the title.
- Click on "Go to Credentials."
- For where the API is being called from select "Web Server" and for the type of data select "User Data."
- Now click "What credentials do I need?"
- Under "Authorized Javascript Origins" enter your forum address.
- Under "Authorized redirect URIs", enter the address again but this time paste the path you copied earlier to the end.
- Click "Create Client ID."
Confirmation email address
You'll be asked to provide a confirmation email address and a product name. This information will be shown to users who register for your forum, so make sure the name given is descriptive of your site. On the last set up page, just click Done.
Your Client ID will now be set up. You'll need both Client ID number and Secret code to activate SSO. To get these, click on the name of your ID. The easiest thing to do is to copy and paste both these codes into a blank notepad window. Once you have done this, you can exit the Google API page.
Returning to NodeBB, copy and paste the Client ID and Secret code into the appropriate places on the Google menu page. You can also allow users who sign on with Google to skip the standard email verification step since Google usually does a good job of verifying these emails, but this is up to you. Be sure to save these settings. Once you are done, you will need to restart the forum one more time.
Once your forum restarts, new users will be able to join your forum using their Google ID. This option will be added to the user registration page automatically.