I don't see the relation between "offline" and "JWT middleware". Two very different things.
Working "offline" means data will be save locally and you can later replicate to a server.
"JWT middleware" is a feature you add to your server to require authentication to its services. If you mean JWT middleware in the server that will receive data for replication, you can use it, when the client that saved data offline wants to send data to the server, it authenticates with the server. It will only need to authenticate when connecting to the server, of course, so there is no relation with "offline"