Exception Signing Algorithm
in my program im using HmacSha512Signature but as soon as i start to execute to generate JWT token my programm throws an exception that my key size must be greater than 512
![No description](https://cdn.answeroverflow.com/1221987293674606672/image.png)
18 Replies
How are you creating the
JwtSecurityToken
? It seems likely the signingCredentials are made with a key that is 136 bits insted of 512Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
appsettingsjason
![No description](https://cdn.answeroverflow.com/1222324542823858316/image.png)
![No description](https://cdn.answeroverflow.com/1222324770033373254/image.png)
it seems likely the signingCredentials are made with a key that is 136 bits insted of 512what is
cred
?
min repro code would be preferable, can def help with that![No description](https://cdn.answeroverflow.com/1222325935588642886/image.png)
Im sorry...
i dont now how to do that stuff
im likely new to github
Is this code on github?
![No description](https://cdn.answeroverflow.com/1222326363474886726/image.png)
yes but private
so i found out when i change my "My secret key" its always ends in an exception bc i use more bits or less bits
no worries. I'm no expert, but I think it's in how you're creating the token . You might have more success with this
so which part do have to replace it with
your
new JwtSecurityToken
should be made with CreateToken
![No description](https://cdn.answeroverflow.com/1222330243365474435/image.png)
the same exception
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View