Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

uBeac.Web.Jwt: Easily register JWT in ASP.NET Core applications

Nuget version Nuget downloads

Start

Install the package with NuGet:

dotnet add package uBeac.Web.Jwt

Register

Just put the following code in Program.cs:

builder.Services.AddJwtAuthentication(builder.Configuration);

app.UseAuthentication();

And in appsettings.json:

{
  "Jwt": {
    "Issuer": "https://localhost:44352",
    "Audience": "https://localhost:44352",
    "TokenExpiry": 3600, // seconds
    "RefreshTokenExpiry": 36000, // seconds
    "Secret": "THIS SHOULD BE A COMPLEX SECRET!"
  }
}