WordPress SSO using ASP.NET as OAuth Server | WP SSO

WordPress SSO using ASP.NET as OAuth Server | WP SSO


WordPress is a free and open-source content management system (CMS) which is used to built websites using templates available in WordPress. One can have secure access into WordPress applications by configuring WordPress Single Sign-On (SSO) using ASP.NET as OAuth Server. By the end of this guide, you would be able to SSO into WordPress using ASP.NET as OAuth Server. To know more about other features we provide in ASP.NET SSO plugin, you can click here.

Pre-requisites: Download and Installation

  • Extract the asp-net-oauth-openid-server-premium.zip after which you will see the following files
  1. mo_asp_net_oauth_server.dll - Add this DLL file in the "bin" folder (where other DLL files exist). Follow the steps in the integration.md file to register the mo_asp_net_oauth_server module in your application.
  2. oauth.config - Add this configuration file in your application's root directory.
  3. integration.md - An integration file with instructions for integrating the module into your application.
  • After the integration, open your browser and go to the URL below to view the module's dashboard:
    https://<your-application-url>?ssoaction=config
  • If the registration or login page appears, you have successfully integrated the miniOrange OAuth SSO module with your application.
  • ASP.NET Login Page
  • Register or login after configuring the SSO module.

Steps to configure ASP.NET SSO using WordPress as OAuth Server

1. Connect ASP.NET module with Database

  • To connect the module with the database, click on Database Settings, fill in all the required fields and click on Connect.
  • ASP.NET OAuth Server - Connect Module with Database

2. Configure ASP.NET as OAuth Server

  • Under Plugin Settings click on Add Client to add a new OAuth client.
  • ASP.NET OAuth Server - Add Client
  • Enter the Client Name and Redirect/Callback URL from your WordPress application in the respective fields and hit Save.
  • ASP.NET OAuth Server - Add Client Name and Redirect URL
  • Note down the Client ID and Client Secret to configure your OAuth Client and paste these values here.
  • ASP.NET OAuth Server - Client ID and Client Secret

3. Login Setup

  • Click on Login Setup to fill App login URL and Encryption Key fields and hit Save.
  • ASP.NET SSO OAuth Server - Login Setup Tab

4. Attribute Mapping

  • Once the user is authenticated, you will be required to store the user data in the session variables. In the ASP.NET plugin, enter the session keys under the Attribute Mapping section that you will require on your WordPress site. Then click on Save Attribute Mapping.
  • ASP.NET SSO - Save Attribute Mapping
  • Note:All mapped attributes will be stored in the session so that you can access them in the application.

5. Configure WordPress as OAuth Client

  • Install WordPress Single Sign-On (SSO) as OAuth Client plugin from here.
  • Go to Configure OAuth tab and click Add New Application to add a new client application.
  • WordPress Single Sign-On (SSO) OAuth - Add new application
  • In the setup wizard, search for "Custom OAuth" and select Custom OAuth 2.0
  • WordPress Single Sign-On (SSO) OAuth - Selct OAuth 2.0 Application
  • Copy the Callback URL to be used in OAuth Provider Configuration and click Next.
  • WordPress Single Sign-On (SSO) OAuth - Callback URL
  • Configure WordPress as OAuth Client by filling out the mandatory fields like Authorize Endpoint, Token Endpoint, Client ID, Client Secret and so on.
  • Please find the values needed to configure WordPress as OAuth Client
  • Application Name: WordPress
    Client ID & Secret: Click here
    Authorize Endpoint: https://<your-app-url>/api/moserver/authorize
    Token Endpoint: https://<your-app-url>/api/moserver/token
    User Info Endpoint: https://<your-app-url>/api/moserver/userinfo
    Scope: profile, email
    WordPress SSO - Configure OAuth
  • After filling in the mandatory fields, click Next.
  • Enter client credentials i.e. Client ID, Client Secret & scope in the respective fields shown below. Click Next.
  • WordPress SSO - Enter Client ID and Secret
  • Click on finish to save configuration.
  • WordPress SSO - Configuration Summary

6. Test Configuration

  • After you've saved your setup, click the Test Configuration button to see if you've done everything correctly.
  • ASP.NET SSO - Test Configuration

7. Integration Code

  • The integration code can be found on the module's Integration Code tab. Simply copy and paste that code snippet wherever you need to get at the user attributes.
  • ASP.NET SSO - Integration Code Tab

In this Guide, you have successfully configured WordPress Single Sign-On (SSO) using ASP.NET as OAuth Server and WordPress as OAuth Client using our ASP.NET OAuth Server plugin. This solution ensures that you are ready to roll out secure access to your ASP.NET application using your WordPress site credentials within minutes.


Need Help?

Mail us on aspnetsupport@xecurify.com for quick guidance (via email/meeting) on your requirement and our team will help you to select the best suitable solution/plan as per your requirement.

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com