<@U04UQ68083H> can I change the ```methods: li...
# ory-copilot
m
@chilly-king-10285 can I change the
Copy code
methods:
    link:
      config:
        lifespan: 24h
  flows:
    verification:
      lifespan: 24h
configurations for Ory Network-hosted Kratos?
c
A message from kapa.ai
Yes, you can change the configuration for the
link
method's
lifespan
and the verification flow's
lifespan
in Ory Network-hosted Kratos. To do this, you need to: 1. Download your current Ory Identities configuration using the Ory CLI:
Copy code
ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
2. Edit the configuration file (
identity-config.yaml
) to set your desired values:
Copy code
yaml    selfservice:      methods:        link:          enabled: true          config:            lifespan: 24h # Set the link lifespan here      flows:        verification:          enabled: true          lifespan: 24h # Set the verification flow lifespan here          use: link
3. Upload the updated configuration back to Ory Network:
Copy code
ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
This process allows you to customize the lifespan for both the magic link and the verification flow as needed for your project hosted on Ory Network [Docs: Account verification](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation) [Docs: Account recovery and password reset](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#configuration).
m
@chilly-king-10285 can this be used to increase the timeout of say the email-password-login/registration flows as well? I got timeouts when working on custom ui yesterday, and it was a bit disruptive UX to just get an error saying it timed out with no action to retry
c
A message from kapa.ai
Yes, you can increase the timeout (lifespan) for the login and registration flows in Ory Network-hosted Kratos. The flow lifespan determines how long a user has to complete the flow (such as login or registration) before it expires and they need to start over. To adjust these timeouts, you need to set the
lifespan
property for the respective flows in your configuration. For example:
Copy code
yaml selfservice:   flows:     login:       lifespan: 30m  # Set login flow timeout to 30 minutes     registration:       lifespan: 30m  # Set registration flow timeout to 30 minutes
You can update these settings using the Ory Console or by downloading, editing, and uploading your configuration as described previously. This will help reduce disruptive timeouts for users working with custom UIs [Docs: Deploy Kratos Example](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#configure-user-interface). If a flow expires, the user will see an error and must restart the flow. There is currently no built-in automatic retry or redirect to a new flow in the default Account Experience UI, which is a known UX issue discussed by the community [GitHub Issue: Login flow expired error](https://github.com/ory/network/issues/417).