-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
I use IJwtService with the following code to generate access token:
var credentials = await jwtService.GetCurrentSigningCredentials();
var tokenDescriptor = _jwtSecurityTokenHandler.CreateJwtSecurityToken(_issuer, _issuer,
new ClaimsIdentity(claims), expires: DateTime.UtcNow.AddMinutes(60), signingCredentials: credentials);
I get here:
System.NotSupportedException: 'IDX10621: 'Microsoft.IdentityModel.Tokens.SymmetricSignatureProvider' supports: 'Microsoft.IdentityModel.Tokens.SecurityKey' of types: 'Microsoft.IdentityModel.Tokens.AsymmetricSecurityKey' or 'Microsoft.IdentityModel.Tokens.SymmetricSecurityKey'. SecurityKey received was of type 'Microsoft.IdentityModel.Tokens.JsonWebKey'.'
Workaround is not to use HS256
kirill-gerasimenko-da
Metadata
Metadata
Assignees
Labels
No labels