Allow Google log in for readers

You can allow readers to sign up for and log in to your knowledge base with their Google account.

KnowledgeOwl Reader Login page with Google Sign-in enabled

To enable this option, you'll need to configure some things in Google Cloud Platform APIs & Services and in KnowledgeOwl.

In Google Cloud Platform, you'll need:

  • A new project
  • An OAuth consent form
  • OAuth credentials

In KnowledgeOwl, you'll need access to:

  • Settings > Security
  • Your Account > Readers

Step 1: Create a Google Cloud Platform project (Google)

You must have a Google Cloud Platform project in order to complete the rest of the steps in this tutorial.

  1. In Google Cloud Platform, go to Google credentials settings to open APIs & Services in Google Cloud Platform.
  2. Click the option to Create Project.
  3. Give your project a name (we recommend using the name of your knowledge base or "KnowledgeOwl" as the project name).
  4. Add an organization and location (if appropriate).

Step 2: Set up your Google Project's Oauth Consent Screen (Google)

Google requires an Oauth consent screen. For more details, see See Google Cloud Platform Console Help's instructions to Manage OAuth App Branding. We cover this only at a high level. Set up your OAuth consent screen by clicking the Configure Consent Screen button.

  1. Click the Configure Consent Screen button.
  2. Select a User Type.
    • External lets any user with a Google account sign up; Internal restricts to users within your Google Cloud Organization. You must make a selection here before you can complete configuration. External does require additional verification, not covered by this guide.
  3. On the OAuth consent screen, in the App information section, at minimum, these fields are required:
    • App name: This is displayed in the "Sign in to continue to [app name]" portion of the Google login process and in the "To continue, Google will share....with [app name]." In our screenshot, we've used "KnowledgeOwl" and you can see where it displays:
    • User support email: In the Google login process, if you click on the hyperlinked App name, this is the email address that is displayed in the Developer info box that appears. Here, we've used our support email address:
  4. On the OAuth consent screen, in the Developer contact information, add an email address.
    This is not displayed anywhere--Google uses it to notify you of changes.
  5. Add other fields in various sections as appropriate for your configuration.
  6. Click Save and Continue.
  7. Set the Scopes for your consent screen. See Google's documentation for guidance here.
  8. Click Save and Continue.
  9. Optional: If you're doing an External User Type, you'll be prompted to add any Test users. (We do recommend using these if you're testing an External User Type.)
  10. Once you're done, Google generally displays a Summary page.

Step 3: Set up the OAuth client credentials (Google + KO)

In this step, you'll copy redirect URLs from KnowledgeOwl into your Google Cloud Platform project.

  1. In Google Cloud Platform, go to Credentials. (This is generally always present in a menu on the left, at the time this documentation was written.)
  2. At the top, click the + Create Credentials button.
  3. Select the option to create an OAuth client ID.
  4. For Application type, select "Web application."
  5. Enter "KnowledgeOwl" as the name.
  6. In the Authorized redirect URIs, you'll paste in some information from KnowledgeOwl:
    1. In KnowledgeOwl, go to Security and access > Security settings.
    2. Go to the Reader sign ins using Google section at the bottom of the page:
      The Reader sign ins using Google section of the Security settings page
    3. Copy the Google login redirect URL and add it as an Authorized redirect URI in Google Cloud Platform.
    4. Copy the KnowledgeOwl Google signup redirect URL and add it as an Authorized redirect URI in Google Cloud Platform:
  7. Once you've added both authorized redirect URIs in Google Cloud Platform, select the Create option there to finish creating your credentials.
  8. This will display the Oauth Client ID and Secret you need in the next step!
    Sample OAuth client created pop-up in Google Cloud Platform, showing the Client ID and Client Secret

Step 4: Add your Google Cloud Platform Client ID and Secret (KO + Google)

In this step, you'll copy the Oauth Client ID and Oauth Secret generated above into KnowledgeOwl.

  1. In KnowledgeOwl, go to Security and access > Security settings.
  2. Go to the Reader sign ins using Google section at the bottom of the page.
  3. Paste your Client ID from Google Cloud Platform into the Google API client ID field.
  4. Paste your Client Secret from Google Cloud Platform into the Google API secret field.
  5. Save your KnowledgeOwl Security settings.

Step 5: Turn on Google login for readers (KO)

With all of the configuration done, you can now enable Google login for readers in KnowledgeOwl! To do so:

  1. Go to Security and access > Readers (or Account > Readers).
  2. Open the Settings tab.
  3. In the Self-Administered Reader Options section, find the Allow Google Sign In heading.
  4. Check the box to Allow readers to log in using their Google account:
    Check the box to Allow readers to log in using their Google account
  5. Optional: to allow readers to sign up for access to your knowledge base, you'll need to check the Reader Signups box to Allow people to sign up to become a reader. Refer to Using reader signups for more details on reader signup options.
  6. Save your changes.

Your Reader Login page now displays a Sign in with Google button. If you've enabled reader sign-ups, the reader sign-up link will display below the login section: