Skip to main content

WordPress SSO Setup

WordPress SSO Setup Why: Streamline your member login experience by allowing them to sign in using their WordPress accounts. This integration enhan...

Written by Ken Truesdale

Platform 2 Guide — This article applies to the new platform. Looking for classic platform docs? Browse the Platform 1 collection.

Why: Streamline your member login experience by allowing them to sign in using their WordPress accounts. This integration enhances convenience and can improve member retention.

Navigate: App Station > Settings > Advanced > Single Sign-On (WordPress)

Quick Start

  1. Install an OAuth plugin on your WordPress site (e.g., WP OAuth Server).

  2. Create an OAuth client in the plugin settings with the required redirect URI.

  3. Gather the OAuth endpoints (Authorization URL, Token URL, User Info URL) from your plugin.

  4. In your Member Kitchens dashboard, go to App Station > Security (Technical) > SSO and configure the WordPress SSO settings.

  5. Test the integration by logging out and using the "Sign in with WordPress" button.


Detailed Setup Instructions

Prerequisites

Before you begin, ensure you have:

  • A WordPress site with admin access.

  • Access to the App Station in your Member Kitchens dashboard.

Step 1: Install an OAuth Plugin on WordPress

To enable SSO, you need an OAuth Server plugin. Here are two recommended options:

Option A: WP OAuth Server (Recommended)

  1. In WordPress, go to Plugins > Add New.

  2. Search for "WP OAuth Server".

  3. Install and activate the plugin.

  4. Navigate to OAuth Server in your WordPress admin menu.

Option B: miniOrange OAuth Server

  1. In WordPress, go to Plugins > Add New.

  2. Search for "miniOrange OAuth Server".

  3. Install and activate the plugin.

  4. Navigate to miniOrange OAuth in your WordPress admin menu.

Step 2: Create an OAuth Client

For WP OAuth Server:

  1. Go to OAuth Server > Clients.

  2. Click Add New Client.

  3. Enter the following settings:

    • Client Name: Member Kitchens (or your app name).

    • Redirect URI: Use the URL shown in App Station > Security (Technical) > SSO.

      • Production (USA): https://app-us.memberkitchens.com/api/auth/callback/wordpress

      • Production (EU): https://app-eu.memberkitchens.com/api/auth/callback/wordpress

      • Local dev: http://localhost:3001/api/auth/callback/wordpress

    • Grant Types: Check "Authorization Code".

    • Scope: Select "openid", "email", and "profile" if available.

  4. Click Save.

  5. Note down the Client ID and Client Secret.

For miniOrange OAuth Server:

  1. Go to miniOrange OAuth > OAuth Clients.

  2. Click Add Client.

  3. Enter the following settings:

    • Client Name: Member Kitchens.

    • Redirect URI: Use the URL shown in App Station > Security (Technical) > SSO.

    • Grant Type: Authorization Code.

  4. Click Save.

  5. Copy the Client ID and Client Secret.

Step 3: Get OAuth Endpoints

You will need the following URLs from your WordPress OAuth plugin:

  • Authorization URL: https://yourblog.com/oauth/authorize

  • Token URL: https://yourblog.com/oauth/token

  • User Info URL: https://yourblog.com/oauth/me

Make sure to check your OAuth plugin documentation for the correct endpoint URLs.

Step 4: Configure in Member Kitchens

  1. In your Member Kitchens dashboard, go to App Station > Security (Technical) > SSO.

  2. Click Configure WordPress SSO.

  3. Fill in the form:

    • Display Name: (Optional) Custom button text, e.g., "Sign in with My Blog".

    • Client ID: Paste from Step 2.

    • Client Secret: Paste from Step 2.

    • Authorization URL: From Step 3.

    • Token URL: From Step 3.

    • User Info URL: From Step 3 (required to fetch user details).

    • Scopes: (Optional) Leave blank or enter openid email profile.

  4. Click Save Configuration.

Step 5: Test the Integration

  1. Log out of your Member Kitchens site.

  2. Go to the login page.

  3. You should see a "Sign in with WordPress" button (or your custom display name).

  4. Click the button and authorize the connection.

  5. You should be redirected back and logged in.

Troubleshooting

  • "Invalid OAuth State" Error: This usually means the login request expired. Try again.

  • "Token Exchange Failed" Error: Verify your Client ID and Client Secret are correct and that the Redirect URI matches exactly.

  • "User Info Failed" Error: Ensure the User Info URL is configured correctly and accessible.

  • Members Can't Sign In: Ensure the WordPress SSO is enabled and that the member has an account on your WordPress site.

Security Considerations

  • Keep secrets safe: Never share your Client Secret publicly.

  • Use HTTPS: Ensure both your WordPress site and Member Kitchens site use HTTPS.

  • Limit access: Consider restricting which WordPress users can use OAuth.

Account Linking

When a member signs in with WordPress:

  1. If their WordPress email matches an existing Member Kitchens account, accounts are automatically linked.

  2. If no matching account exists, a new member account is created.

Did this answer your question?