A way to generate immortal (never expire) JWT token

I referred the following topic: Jwt Token renewal - LoRa App Server - LoRa Server forum.
Then I explored the lora-app-server code, but I couldn’t find any way to generate a JWT token without the exp property.
Referred: https://github.com/brocaar/lora-app-server/blob/c30f86bcc4f05a93c656d43633b4a72d73f04cb9/internal/storage/user.go#L415-L427

Is there any method to do that? If not, I wish an option to generate JWT immortal token.
I wrote a PoC patch: https://github.com/moznion/lora-app-server/commit/a6ca3895a15420ae2522ba511a3a68e27b681737

How does it?

You can generate your own JWT token. A JWT token is “nothing more” than a signed JSON object. So when you know the secret to sign this JSON object, you can define yourself (external from the LoRa Server project) what you want to put in your JWT token.

1 Like

Basically, does that mean tokens that are generated in app-server are used only user console, right?

That is correct. For external integrations you should use your own token generation meganism.

1 Like

I understood. Thank you so much!