I have written the code for a class that is used to generate and validate JWTs based on this tutorial: https://dotnetcoretutorials.com/2020/01/15/creating-and-validating-jwt