Prerequisite
- Okta Account
- WordPress website
WordPress does not independently authenticate users when Okta and WordPress use Single Sign-On (SSO). Instead, it uses Okta to verify a user's identity.
Consider it like this:
The program that the user wants to use is called WordPress.
The trusted identity provider (IdP) that confirms the identity of the user is Okta.
SAML 2.0 is the protocol that securely sends the authentication result from Okta to WordPress.
Before SSO
Without SSO, the login flow looks like this:
The user
│
WordPress Login Page
│
Username + Password
│
WordPress checks credentials.
│
Database
│
Login Success
Problems with this approach include:
- Users must remember separate passwords.
- Passwords are stored and managed by WordPress.
- MFA may not be consistently enforced.
- User accounts have to be managed separately in WordPress.
After SSO
With Okta SSO:
User
│
▼
WordPress Website
│
▼
"Login with Okta"
│
▼
Okta
│
Username + Password
│
▼
MFA Challenge
│
▼
Identity Verified
│
▼
SAML Response Sent
│
▼
WordPress
│
▼
User Logged In
Observe that the password is never checked by WordPress. It just acknowledges Okta's reliable response.
The Components
1. User
The employee, administrator, editor, or customer trying to log in.
Example:
John
John wants to access:
https://company.com/wp-admin
2. WordPress (Service Provider)
In SAML, WordPress acts as the Service Provider (SP).
Its job is to:
- Request authentication.
- Trust Okta's response.
- Create a local session.
- Assign the appropriate WordPress role.
WordPress does not verify the password.
3. Okta (Identity Provider)
Okta is the Identity Provider (IdP).
It:
- Stores user identities.
- Verifies passwords.
- Enforces MFA.
- Applies sign-in policies.
- Sends a signed SAML response back to WordPress.
4. SAML
SAML (Security Assertion Markup Language) is an XML-based standard for exchanging authentication information.
WordPress sends a request like
Please authenticate this user.
Okta replies:
This user has been authenticated.
Email:
john@company.com
First Name:
John
Last Name:
Smith
Groups:
Administrators
The response is digitally signed so WordPress can verify it hasn't been altered.
A Real Login Walkthrough
Suppose:
WordPress site:
https://company.com
Okta organisation:
https://company.okta.com
The login sequence is
Step 1
John opens:
https://company.com/wp-admin
WordPress sees no active session.
Step 2
Instead of showing the standard login form, WordPress redirects John to Okta.
company.okta.com
Step 3
Okta displays its login page.
Email:
Password
Step 4
Okta prompts for MFA if required.
For example:
Approve on Okta Verify
or
Enter 6-digit code
Step 5
Okta verifies:
- Password
- MFA
- Device policies
- Location policies
- Time-based policies If everything meets policy, authentication succeeds.
Step 6
Okta generates a SAML assertion.
This contains information such as:
NameID
john@company.com
First Name
John
Last Name
Smith
Department
IT
Groups
Administrators
The assertion is digitally signed with Okta's private key.
Step 7
WordPress validates:
- The signature.
- The certificate.
- The issuer.
- The audience.
- The assertion's expiration time.
If all checks pass, WordPress trusts the response.
Step 8
WordPress creates a local session and, if configured, maps the user to a role.
What Happens the First Time a User Logs In?
If Just-In-Time (JIT) provisioning is enabled:
- The user authenticates with Okta.
- WordPress doesn't find a matching account.
- WordPress automatically creates the account.
- The user is logged in.
This avoids manually creating WordPress accounts.
What Happens on Later Logins?
WordPress finds the existing account by email or another mapped identifier and signs the user in immediately after Okta authenticates them.
Why This Is More Secure
Instead of storing passwords in WordPress:
100 Passwords
↓
WordPress Database
You centralise authentication in Okta:
100 Users
↓
Okta
↓
WordPress trusts Okta
Benefits include:
- One password per user across applications.
- Centralised MFA enforcement.
- Faster onboarding and offboarding.
- Centralised audit logs.
- Reduced password reuse.
- Consistent access policies.
Common Security Policies You Can Enforce in Okta
Examples include:
- Require MFA for WordPress administrators.
- Block sign-ins from countries your organisation doesn't operate in.
- Require managed or compliant devices.
- Deny access from anonymous proxies or VPNs (if licensed features are available).
- Block legacy authentication methods.
- Set session timeout and re-authentication requirements.
These policies are enforced before WordPress grants access.


Top comments (0)