<@U04UQ68083H> How do I set the JWT expiration?
# ory-copilot
b
@chilly-king-10285 How do I set the JWT expiration?
c
A message from kapa.ai
In Ory, you can set the JWT expiration by configuring the
/oauth2/grant/jwt/max_ttl
setting using the Ory CLI. Here is an example of how to do it:
Copy code
bash ory patch oauth2-config \    --replace "/oauth2/grant/jwt/max_ttl=1h"
This command sets the maximum time to live (TTL) for the JWT to 1 hour. You can replace
1h
with the desired lifespan for your JWT. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/hydra/guides/jwt#configuring-jwt-validation-parameters).