Descope With WordPress
Add Descope's advanced authentication features to your WordPress site using our WordPress Plugin. This guide walks you through the integration process.
Watch our video tutorial for a live demonstration of the WordPress Plugin.
Installation
- Open your WordPress dashboard
- Navigate to Plugins --> Add New Plugin
- Search for "Descope"
- Click Install and then Activate
Configuration
Basic Setup
- Go to the Descope Settings tab in your WordPress dashboard
- Under Descope Configuration, enter your Descope Project ID
SSO Setup (Optional)
If you plan to use SSO:
- Set up a SAML or OIDC Federated Application
- Navigate to the SSO Configuration tab in WordPress
- Enter your SAML/OIDC configuration details
Shortcodes
WordPress shortcodes let you add Embedded Flows, SAML/OIDC SSO, Google OneTap, Protected Pages, and Logout Buttons to your site.
Embedded Flows
Add authentication flows to any page using the [descope_wc]
shortcode:
You can customize your flow to include any of our Authentication Methods from the Descope Console. If you don't specify a flow_id
, the flow will default to "sign-up-or-in".
SAML/OIDC SSO
First, make sure you have set up your federated app in your Descope console, as described in our Federated Applications guide.
Then, make sure to provide your SAML or OIDC Configuration Details in the Descope Settings page of your WordPress dashboard. Some values have been masked below, but make sure to provide all the values in the relevant column.
Add the [saml_login_form]
or [oidc_login_form]
shortcode to your page to add the SSO capabilities.
When the user is not logged in, the shortcode will display a login
button, and when the user is logged in, a logout
button will be displayed instead.
Google One Tap
Add Google One Tap authentication using the [onetap_form]
shortcode:
provider_id
is optional (defaults to "google")- Requires Google Provider configuration
- Only visible to unauthenticated users
Logout Button
Add a logout button that's only visible to authenticated users:
Protected Page
Protect pages from unauthorized access using the [descope_protected_page]
shortcode. Configure redirection behavior for unauthenticated users:
Basic Redirection
Redirects unauthenticated users to another page, such as your login page.
OIDC Auto-Login
- Automatically initiates OIDC login for unauthenticated users
- Optional
return_to
parameter specifies the post-authentication redirect
OIDC auto-login requires proper OIDC configuration.
User Syncing
The WordPress user table is the source of truth for your site's users. The user table is synced with Descope every 24 hours, but you can also manually sync users under Sync Users in the Descope Settings tab of your WordPress dashboard.
This is also where you can map WordPress custom fields to a Descope custom attribute you have already created. Any WordPress custom fields mapped here will show up in the Descope user table as custom attributes.
WeWeb
If you're using WeWeb to design and build your web applications, this tutorial will walk you through how to integrate Descope into your WeWeb website.
Business to Business (B2B)
Learn how to implement B2B use cases with Descope's multi-tenancy, tenant management, SSO, and user provisioning for robust applications.