jwt-best-practices From the tutorial written here You can get the complete code that include middlewares and separated into packages from here And the youtube tutorial series