Redis.Sharp.Identity 1.1.8

dotnet add package Redis.Sharp.Identity --version 1.1.8
                    
NuGet\Install-Package Redis.Sharp.Identity -Version 1.1.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Redis.Sharp.Identity" Version="1.1.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redis.Sharp.Identity" Version="1.1.8" />
                    
Directory.Packages.props
<PackageReference Include="Redis.Sharp.Identity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Redis.Sharp.Identity --version 1.1.8
                    
#r "nuget: Redis.Sharp.Identity, 1.1.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Redis.Sharp.Identity&version=1.1.8
                    
Install Redis.Sharp.Identity as a Cake Addin
#tool nuget:?package=Redis.Sharp.Identity&version=1.1.8
                    
Install Redis.Sharp.Identity as a Cake Tool

Redis Sharp Identity

A better; faster identity implementation for Redis, built on top of Redis Sharp.

Features

🛠️ Install Dependencies

nuget install Redis.Sharp.Identity

This will only work for a Redis Database that has Redis Search activated.

Important Information

Please review RedisSharp to ensure you're familiar with how the ApplicationUser and ApplicationRole is expected to work. They both implement IAsyncModel.

🧑🏻‍💻 Setup and Installation

First and and most importantly; initialize your redis singleton.

RedisSingleton.Initialize("host", port, "password");

Make sure your ApplicationUser enherits from RedisIdentityUser and your ApplicationRole inherits from RedisIdentityRole

    public class ApplicationUser : RedisIdentityUser
    public class ApplicationRole : RedisIdentityRole

Next up, add your stores.

builder.Services.AddRedisIdentityStores<ApplicationUser, ApplicationRole>();

If you need to use a custom user manager for your project, please ensure that you enherit from RedisUserManager<TUser> Our manager is necessary and is automatically included with AddRedisIdentityStores()

Setup your identity how you like.

builder.Services.AddIdentity<ApplicationUser, ApplicationRole>(options =>
{
    options.SignIn.RequireConfirmedAccount = false;
    options.User.RequireUniqueEmail = true;

}).AddDefaultTokenProviders() 
    .AddSignInManager(); 

Everything else forwards is pretty standard, include your authentication scheme and you should be all set.

builder.Services.AddAuthentication(options =>
{
    options.DefaultScheme = IdentityConstants.BearerScheme;
    options.DefaultSignInScheme = IdentityConstants.BearerScheme;
}).AddBearerToken();

Author

Bryly Maeder
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.8 87 5/2/2025
1.1.7 143 4/30/2025
1.1.6 135 4/30/2025
1.1.5 134 4/30/2025
1.1.4 153 4/21/2025
1.1.3 153 4/21/2025
1.1.2 176 4/20/2025
1.1.1 189 4/15/2025
1.1.0 136 4/12/2025
1.0.9 159 4/10/2025
1.0.8 156 4/9/2025
1.0.7 160 4/8/2025
1.0.6 155 4/8/2025
1.0.5 156 4/8/2025
1.0.4 466 3/25/2025
1.0.3 466 3/25/2025
1.0.2 478 3/25/2025
1.0.1 479 3/25/2025
1.0.0 397 3/24/2025

RedisSharpIdentity implements RedisSharp