A simple auth library for aspnetcore. AuthEndpoints library provides a set of minimal api endpoints to handle basic & authentication actions such as registration, email verification, reset password, login, logout, etc.
- Identity api:
- sign-up
- email verification
- account info
- reset password
- forgot password
- enable 2fa
- login
- logout
- confirm identity
- Simple JWT:
- Create (login)
- Refresh
- Verify
The easiest way to install AuthEndpoints is via NuGet
Install the library using the following dotnet cli command:
dotnet add package AuthEndpoints --version 3.0.0-alpha.1
or in Visual Studio's Package Manager Console, enter the following command:
Install-Package AuthEndpoints
// Program.cs
builder.Services
.AddIdentityApiEndpoints<AppUser>() // <--
.AddRoles<AppRole>()
.AddEntityFrameworkStores<AppDbContext>()
.AddDefaultTokenProviders();
var app = builder.Build();
...
app.UseAuthentication(); // <--
app.UseAuthorization(); // <--
...
app.MapAuthEndpointsIdentityApi(); // <--
app.Run();Documentation is available at https://madeyoga.github.io/AuthEndpoints/ and in docs directory.
