-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Description
Hi! 👋
I made a modification so that the token expiration time is 1 minute, but the token is still valid.
var jwtToken = handler.CreateJwtSecurityToken(
_issuer,
audience: null,
identity,
notBefore: DateTime.Now,
expires: DateTime.Now.AddMinutes(1), // 👈 updated
issuedAt: DateTime.Now,
_jwtSigningCredentials);
I'm not sure if I need to configure this, but when I do, it throws this error:
Bearer error="invalid_token",error_description="The signature key was not found"
builder.Services.AddAuthentication().AddJwtBearer(options =>
{
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateLifetime = true,
};
});
Metadata
Metadata
Assignees
Labels
No labels