Implement Refresh Tokens in ASP.NET (OWIN) MVC application

Problem statement

We are trying to implement refresh tokens in our C# ASP.NET (OWIN) MVC Application but we can’t find any documentation or working code for this type of application.

Cause

Unfortunately, there is no official documentation or an official sample for implementing the use of Refresh Tokens in an ASP.NET (OWIN) MVC application.

Solution

The following resource is a sample application from one of our engineers who was kind enough to test this when Refresh Tokens first launched and he posted his project to GitHub:

This is the best available resource you will find and the closest to an official implementation. However, the above project has not been updated in a few years, so you will probably need to update some dependencies.