mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: login & registration; enhanced paste view; custom dropdown + search; navbar; global user access via store; auto token refresh; paste creation as user; /api/user/me, returns info on yourself including pastes;
fix: auth check refactor: remove user UID api endpoint
This commit is contained in:
@@ -38,16 +38,17 @@ namespace SharpbinV3.Server
|
||||
})
|
||||
.AddJwtBearer(jwt =>
|
||||
{
|
||||
var key = Encoding.ASCII.GetBytes(builder.Configuration.GetSection("JwtConfig:Secret").Value ?? string.Empty);
|
||||
var jwtSettings = builder.Configuration.GetSection("JwtSettings");
|
||||
var key = Encoding.ASCII.GetBytes(jwtSettings["Secret"] ?? string.Empty);
|
||||
jwt.SaveToken = true;
|
||||
jwt.TokenValidationParameters = new TokenValidationParameters
|
||||
{
|
||||
ValidateIssuerSigningKey = true,
|
||||
IssuerSigningKey = new SymmetricSecurityKey(key),
|
||||
ValidateIssuer = true,
|
||||
ValidIssuer = builder.Configuration["JwtConfig:Issuer"],
|
||||
ValidIssuer = jwtSettings["Issuer"],
|
||||
ValidateAudience = true,
|
||||
ValidAudience = builder.Configuration["JwtConfig:Audience"],
|
||||
ValidAudience = jwtSettings["Audience"],
|
||||
RequireExpirationTime = true,
|
||||
ValidateLifetime = true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user