Custom login module based on jwt token is not commonly used with on-premise MDM, if at all. You may want to evaluate other options if you are working with the multidomain MDM or on-premise MDM.
Right now I don't think we have any templates available for this.
If you are looking to explore other options, We do have a utility that helps to integrate MDM with SAML-based SSO authentication. For details on this please refer to our KB article