Search Results :

×

ASP.NET OAuth Single Sign-On (SSO) with WordPress as OAuth Server

ASP.NET is an open-source web framework to build web applications and services that can run on Windows, macOS and Docker. One can have secure access into ASP.NET applications by configuring Single Sign-On (SSO) using WordPress as OAuth Server. By the end of this guide, you would be able to SSO into ASP.NET using WordPress as OAuth Server. To know more about other features we provide in ASP.NET SSO plugin, you can click here.

  • Download the miniOrange ASP.NET OAuth 2.0 Module from here.
  • Extract the asp-net-oauth-sso-module.zip after which you will see the following files
    1. miniorange-oauth-sso.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 miniorangeoauthsso module in your application.
    2. oauthsso.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
  • Once installed click on Activate.
ASP.NET Login Page

  • Register or login after configuring the SSO module.
  • From the miniOrange OAuth Server menu on the left side, select Custom OAuth 2.0 Client.
WordPress OAuth Server - Select Custom OAuth 2.0 Client

  • Enter the Client Name and Redirect/Callback URL from your ASP.NET application in the respective fields and hit Save Client.
WordPress OAuth Server - Client Name and Redirect URL

  • Note down the Client ID, Client Secret and Endpoints to configure your OAuth Client and paste these values here.
ASP.NET SSO - Endpoints

  • Configure ASP.NET as OAuth Client by filling out the mandatory fields like Authorize Endpoint, Client ID, Client Secret and so on.
  • Please find the values needed to configure ASP.NET as OAuth Client
Application Name:

WordPress

Client ID & Secret: Click Here
Authorize Endpoint:

https://<your-app-url>/wp-json/moserver/authorize

Token Endpoint:

https://<your-app-url>/wp-json/moserver/token

User Info Endpoint:

https://<your-app-url>/wp-json/moserver/resource

Scope :

profile openid email

ASP.NET SSO - Configure OAuth

  • After filling in the mandatory fields, hit Save.
  • After you've saved your setup, click the Test Configuration button to see if you've done everything correctly.
OASP.NET SSO - Test Configuration

  • Map the Attribute Names provided by your OAuth Server to the Attributes provided by your ASP.NET application in the Attribute Mapping Section, then click 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.

  • 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

  • Use the following URL as a link in your application from where you want to perform SSO:
  • http://base-url/?ssoaction=login
  • For example, you can use it as
  • <a href="http://base-url/?ssoaction=login">Log in</a>


In this Guide, you have successfully configured ASP.NET Single Sign-On (SSO) using WordPress as OAuth Server and ASP.NET application as Service Provider using our WordPress 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.


ADFS_sso ×
Hello there!

Need Help? We are right here!

support