Skip to main content

WordPress SSO Setup

Updated yesterday

Why: Streamline your member login experience by allowing them to sign in using their WordPress account. This integration saves time and enhances user satisfaction by providing a familiar login method.

Navigate: App Station > Settings > Integrations > WordPress SSO

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 your app details.

  3. Gather the OAuth endpoints from your WordPress plugin.

  4. In App Station, go to App Settings > SSO and configure the WordPress SSO settings.

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


Detailed Instructions

Step 1: Install OAuth Plugin on WordPress

To enable Single Sign-On, you need to install an OAuth Server plugin on your WordPress site. 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. Go 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. Go to miniOrange OAuth in your WordPress admin menu.

Step 2: Create OAuth Client

After installing the plugin, you need to 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 > App Settings > SSO

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

      • Production (EU): https://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 > App Settings > 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 plugin documentation for the correct endpoints, as they may vary based on your settings.

Step 4: Configure in Member Kitchens

Now, you need to configure the WordPress SSO settings in your app:

  1. In your Member Kitchens dashboard, go to App Station > App Settings > 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

To ensure everything is working correctly:

  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

If you encounter issues, here are some common problems and solutions:

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

  • "Token Exchange Failed" Error: Verify your Client ID and Client Secret, and ensure the Redirect URI matches exactly.

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

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

  • Error: "SSL Certificate Problem": Ensure your WordPress site has a valid SSL certificate (HTTPS).

Account Linking

When a member signs in with WordPress:

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

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

  3. Members can have multiple login methods (WordPress + email/password).

Related Features

  • Managing Member Accounts

  • Creating Offers for Members

  • Setting Up Payment Integrations

Did this answer your question?