<@U04UQ68083H> I have this config: ``` methods: ...
# ory-copilot
r
@chilly-king-10285 I have this config:
Copy code
methods:
    password:
      enabled: true
    link:
      enabled: true
    code:
      enabled: true
      passwordless_enabled: true
how long the code which was sent via email stays active?
b
A message from kapa.ai
Based on the knowledge sources, the default lifespan for a one-time code sent via email in Ory is 1 hour (1h). However, you can configure this duration in your configuration. If you want to modify the lifespan of the code, you can add the following configuration to your setup:
Copy code
yaml selfservice:   methods:     code:       enabled: true       passwordless_enabled: true       config:         lifespan: 15m  # Defines how long the code is valid for. Default: 1h
This would change the code's validity period to 15 minutes instead of the default 1 hour. The lifespan configuration applies to various flows that use the code method, including account recovery, verification, and passwordless login [Account recovery and password reset](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#configuration).