Hi,
I have a doubt, the getTokenSilently is generating token with my client secret that I have auth application?
I have this doubt because my asp.net core is not validating the secret key, below it is my code.
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
}).AddJwtBearer(options =>
{
options.Authority = domain;
options.Audience = audience;
options.TokenValidationParameters = new TokenValidationParameters
{
NameClaimType = ClaimTypes.NameIdentifier,
ValidateIssuerSigningKey = true,
IssuerSigningKey = new SymmetricSecurityKey(key),
ClockSkew = TimeSpan.FromSeconds(10),
RequireExpirationTime = true,
ValidateLifetime = true,
ValidateIssuer = true,
ValidateAudience = true
};
});