Set up WordPress OAuth2 SSO

Enabling WordPress SSO

You can use WordPress as one of the OAuth2 SSO methods available in Bettermode. Learn more about how OAuth2 SSO works and what other OAuth2 SSO methods Bettermode supports.

Required credentials for setting up WordPress SSO

You need the following information to configure WordPress SSO:

  • Client ID (required): An alphanumeric string publicly exposed and used by the service API to identify your application. This is also used to build authorization URLs presented to your users.
  • Client Secret (required): A secret known only to your application and the authorization server. It protects your resources by granting tokens only to authorized requestors.
  • WordPress Domain (required): The domain URL of your WordPress website.
  • Login Button Text (required): The text that appears on your login page for users. You can enter any text. Example: "Login with SSO"
  • Redirect URI (required): The URL where your browser redirects after authentication is complete.

How to find WordPress credentials

Follow these steps to locate your WordPress domain, Client ID, and Client Secret:

  1. Visit your WordPress website.
  2. Go to Plugins > Add New and wait for the page to load.
  3. Search for OAuth in the top right and install the WP OAuth Server (OAuth Authentication) plugin.
  4. After installation, go to your WordPress admin dashboard. Navigate to OAuth Server > Clients and click Add New Client.
  5. On the next page, enter the following information:
  6. Click Create Client. On the confirmation page, you will see your Client ID, Client Secret, and WordPress Domain.

Set up OAuth2 SSO using WordPress

  1. Log into Bettermode with your admin account. Click your profile picture in the top right corner, then select Administration > Settings > Authentication. Click the Enable button next to "Single sign-on".
  2. Select WordPress as your SSO Provider. Enter the following information from the previous section:
    • Client ID
    • Client Secret
    • WordPress Domain
    • Login Button Text

    Note: All fields are required.

  3. Toggle the Enable OAuth2 switch to on and click Update.
  4. Your WordPress OAuth2 SSO is now active and ready to use.
  5. Visit your site URL (example: https://community1.blogha.com) and click the login button. Authenticate using your credentials on the SSO login page.

Login & register with email

If you want members to be directed to the SSO provider page when they open your site, you need to disable the "Login & register with email" option.

To disable this option:

  1. Click your profile picture in the top right corner.
  2. Select Administration > Settings > Authentication.
  3. Turn off the toggle for Login & register with email.

Once disabled, your users will no longer see the default email and password login option.

What's Next?

Contact Us

Do you still need help? Learn how to get in touch with the Bettermode Team.