Membersuite SSO
SSO Wordpress plugin for membersuite
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/asmbs/membersuite-sso/archive/refs/heads/main.zipReadme
ASMBS SSO
A WordPress plugin that handles MemberSuite reverse SSO authentication for ASMBS members and staff.
How It Works
MemberSuite redirects users to a WordPress page with a tokenGUID parameter. The plugin intercepts this request, exchanges the token for user information via the MemberSuite API, looks up or creates the corresponding WordPress account, assigns the appropriate role, and logs the user in.
Requirements
- WordPress 6.0+
- PHP 8.1+
- Composer
- MemberSuite account with API access
Installation
Install via Composer from the ASMBS Satis repository:
composer require asmbs/membersuite-sso
Environment Variables
The following variables must be set in your .env file:
MS_EMAIL=your-membersuite-email
MS_PASSWORD=your-membersuite-password
MS_PARTITION_KEY=your-partition-key
Role Mapping
WordPress roles are assigned based on membership type and benefit status from MemberSuite:
| Membership Type | Benefits | WordPress Role |
|---|---|---|
| Surgeon/Physician Membership (+ Renewal) | Yes | active_member |
| Integrated Health (+ Renewal) | Yes | active_member |
| International (+ Renewal) | Yes | active_member |
| Candidate Member | Yes | active_member |
| Surgeon/Physician Membership (+ Renewal) | No | active_member |
| Integrated Health (+ Renewal) | No | inactive_member |
| International (+ Renewal) | No | inactive_member |
| Candidate Member | No | inactive_member |
| Corporate Council Representative | Any | corporate_council_representative |
| Friend | Any | nonmember |
| Application | Any | nonmember |
| Staff (no membership record) | — | preserved |
User Lookup
When a user logs in the plugin attempts to find their WordPress account in this order:
- MemberSuite GUID (
mem_guiduser meta) - MemberSuite local ID (
mem_keyuser meta) - Email address
- Creates a new account if none found
Logging
SSO activity is logged to /tmp/sso-debug.log. Each login attempt logs the user lookup, role assignment, and any meta backfilling.
Updating
When creating a new version of this plugin, please be sure to update:
- The CHANGELOG.md file
- The version number in asmbs-sso.php
- Tag release on github accordingly (which will trigger packagist rebuild)