Skip to content

madeyoga/AuthEndpoints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AuthEndpoints

nuget issues downloads workflow CodeFactor license

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.

swagger_authendpoints

Endpoints

  • Identity api:
    • sign-up
    • email verification
    • account info
    • reset password
    • forgot password
    • enable 2fa
    • login
    • logout
    • confirm identity
  • Simple JWT:
    • Create (login)
    • Refresh
    • Verify

Installing via NuGet

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

Quick start

// Program.cs

builder.Services
    .AddIdentityApiEndpoints<AppUser>() // <--
    .AddRoles<AppRole>()
    .AddEntityFrameworkStores<AppDbContext>()
    .AddDefaultTokenProviders();

var app = builder.Build();

...

app.UseAuthentication(); // <--
app.UseAuthorization(); // <--

...

app.MapAuthEndpointsIdentityApi(); // <--

app.Run();

Documentations

Documentation is available at https://madeyoga.github.io/AuthEndpoints/ and in docs directory.

About

A simple jwt library for aspnetcore that provides a set of minimal api endpoints to handle authentication actions

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages