Skip to content

Instantly share code, notes, and snippets.

@RodionChachura

RodionChachura/Configure.cs Secret

Created Oct 7, 2020
Embed
What would you like to do?
var tokenValidationParameters = new TokenValidationParameters()
{
RequireExpirationTime = true,
ValidateIssuer = false,
ValidateAudience = false,
IssuerSigningKey = new SymmetricSecurityKey(Convert.FromBase64String(SecretKey))
};
app.UseJwtBearerAuthentication(new JwtBearerOptions
{
AutomaticAuthenticate = true,
AutomaticChallenge = true,
TokenValidationParameters = tokenValidationParameters
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment