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
<PackageReference Include="Redis.Sharp.Identity" Version="1.1.8" />
<PackageVersion Include="Redis.Sharp.Identity" Version="1.1.8" />
<PackageReference Include="Redis.Sharp.Identity" />
paket add Redis.Sharp.Identity --version 1.1.8
#r "nuget: Redis.Sharp.Identity, 1.1.8"
#addin nuget:?package=Redis.Sharp.Identity&version=1.1.8
#tool nuget:?package=Redis.Sharp.Identity&version=1.1.8
Redis Sharp Identity
A better; faster identity implementation for Redis, built on top of Redis Sharp.
Features
- All user and role stores are implemented.
- Built upon RedisSharp (https://github.com/BrylyMaeder/RedisSharp)
- Works out of the box
🛠️ 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
- Github: https://github.com/BrylyMaeder
Product | Versions 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. |
-
net9.0
- Microsoft.AspNetCore.Components.Authorization (>= 9.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.4)
- Microsoft.Extensions.Identity.Core (>= 9.0.4)
- Redis.Sharp (>= 1.2.8)
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