Azure Table Storage Identity Server 3 Stores

TLDR link Azure Table Storage for Identity Server GitHub and Nuget

I have been using Identity Server 3 since it was in beta. I started off only needing the basic stores, but eventually, I started using refresh tokens and the client list has grown. I tried using Redis for some of the stores but it felt like it was a hack to get it to work with all of the features. So, I abandoned that effort and started writing the stores again using Azure Table Storage. Since I don't like maintaining servers, Azure Table Storage was a natural choice. It also helps that it is lightning fast, cheap and simple to use.

How to set it up

Download the Nuget Package or build from source.

Next, when setting up the factory add the registrations for the stores.

var connectionString = ConfigurationManager.ConnectionStrings["AzureTableStorage"].ConnectionString;  
var clientStore = new AzureTableStorageClientStore(connectionString);

var refreshTokenStore = new AzureTableStorageRefreshTokenStore(clientStore, scopeStore, connectionString);  
var authorizationTokenStore = new AzureTableStorageAuthorizationCodeStore(clientStore, scopeStore, connectionString);

var factory = new IdentityServerServiceFactory  
    ClientStore = new Registration<IClientStore>(clientStore),
    RefreshTokenStore = new Registration<IRefreshTokenStore>(_ => refreshTokenStore),
    AuthorizationCodeStore = new Registration<IAuthorizationCodeStore>(_ => authorizationTokenStore)
    // other setup omitted

That's it! You are good to go as long as you have a valid table storage connection string. Now go checkout out the data. I use the Azure Storage Explorer but there are other ones out there. Navigate to one of the tables and view the data. Any ideas or issues head over to the GitHub issues and let me know. Thanks and enjoy!