Single Sign On with MySQL

Single Sign On with MySQL Provider

As a Proof of Concept, I created an ASP.NET MVC Core Identity Server project that acts as a Single Sign-On Application for any type of Web-based Authentication system.

An ASP.NET MVC Core Web Application built using ASP.NET MVC Core, .NET Core 2.0, IdentityServer4 and Entity Framework Core for MySQL database provider.

ASP.NET MVC Core

.NET Core 2.0 enables the deployment and running of ASP.NET MVC applications on servers other than Windows Server platforms running IIS. In this case, it runs on a MacBook running an Apache web server with a local MySQL database instance.

ASP.NET MVC Core Web App on MacBook and Apache

Database Platform

Until recently, I have always felt the only reliable and cost-efficient database for smaller to mid-sized projects to be Microsoft SQL Server. This proof of concept project makes it clear that the MySQL database engine and Entity Framework Core are playing very well together and are sufficiently mature to serve most small to mid-sized authentication gateway, servicing ASP.NETMVC Core applications, Web API application as well as mobile and desktop applications..

MySQL Workbench Showing ASP.NET Identity and Identity Server tables

Single Sign On with OpenID and IdentityServer4

Using the IdentityServer4 Nuget package, along with ASP.NET MVC, to create a simple login MVC application that uses EntityFramework Core to communicate with a MySQL database. IdentityServer4 provides the functionality to register applications and services, and then authenticate against the ASP.NET security platform using tokenized access.

Registering Applications

Validating Mobile Users

A sample Xamarin Forms app provides an excellent example of how to authenticate against the single sign on server using…

Validating Web Users

We can validate web users using the sample ASP.NET MVC application and …

Validating API Access

With the sample Web API REST service, we can validate API access for consumers of an API service requiring authentication.

Project Source Code

The working copy of this project’s code can be found here.

Software Licensing

I do have a variety of Open Source projects that I work on when I have time. These include some example code as well as a personal budgeting application designed for Android, iOS and UWP mobile devices.

I use the Apache License 2.0 for most Open Source projects. I’m open to other  licenses as warranted.