#12840·zitadel

[Bug]: Console blocks saving Login Behavior settings when login lifetimes are 0

Author: matiasracedoCreated Sep 30, 2026Updated Sep 30, 2026

Preflight Checklist

  • I could not find a solution in the documentation, the existing issues or discussions
  • I have joined the ZITADEL chat

Environment

ZITADEL Cloud

Version

4.19.3

Database

None

Database Version

No response

Describe the problem caused by this bug

When an organization-level Login Policy contains login lifetime values set to 0, the ZITADEL Console prevents saving changes to the Login Behavior and Security settings.

This also affects unrelated settings such as the Default Redirect URI.

The Console displays:

Form contains invalid value(s).

No API request is sent when this happens.

The same change can be applied successfully through the Management API.

Example policy state

The affected organization returns the following login settings:

json
{
  "details": {
    "sequence": "20",
    "changeDate": "2026-09-23T11:21:57.045597Z",
    "resourceOwner": "REDACTED",
    "creationDate": "2026-09-23T09:44:23.907783Z"
  },
  "settings": {
    "allowUsernamePassword": true,
    "allowLocalAuthentication": true,
    "defaultRedirectUri": "https://example.com/callback",
    "passwordCheckLifetime": "0s",
    "externalLoginCheckLifetime": "0s",
    "mfaInitSkipLifetime": "0s",
    "secondFactorCheckLifetime": "0s",
    "multiFactorCheckLifetime": "0s",
    "secondFactors": [
      "SECOND_FACTOR_TYPE_OTP",
      "SECOND_FACTOR_TYPE_U2F",
      "SECOND_FACTOR_TYPE_OTP_EMAIL"
    ],
    "multiFactors": [
      "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION"
    ],
    "resourceOwnerType": "RESOURCE_OWNER_TYPE_ORG"
  }
}

To reproduce

  1. Configure or use an organization-level Login Policy where the login lifetime values are 0s, for example:
passwordCheckLifetime: 0s
externalLoginCheckLifetime: 0s
mfaInitSkipLifetime: 0s
secondFactorCheckLifetime: 0s
multiFactorCheckLifetime: 0s
  1. Open:
Organization → Settings → Login Behavior and Security
  1. Change an unrelated setting, for example the Default Redirect URI.

  2. Click Save.

  3. The Console shows:

Form contains invalid value(s).
  1. No Management API request is sent.

Screenshots

No response

Expected behavior

The Console should be able to load and save policy states that are valid and can be returned/stored by the ZITADEL API.

If 0 is a supported value for these lifetime settings, the Console validation should allow it.

If 0 is intentionally not supported, the API and Console validation should be consistent, and the Console should clearly indicate which lifetime fields are invalid instead of blocking an unrelated setting with only the generic:

Form contains invalid value(s).

Actual behavior

The Console loads 0s lifetime values as 0, but client-side validation requires a minimum value of 1 for several lifetime fields.

The lifetime form currently rejects 0 for:

  • passwordCheckLifetime
  • externalLoginCheckLifetime
  • secondFactorCheckLifetime
  • multiFactorCheckLifetime

mfaInitSkipLifetime appears to allow 0.

Because savePolicy() checks whether the lifetime form is invalid before submitting the policy, saving any setting on the page is blocked:

typescript
if (this.lifetimeForm.invalid) {
  this.toast.showError('POLICY.LOGIN_POLICY.LIFETIME_INVALID', false, true);
  return;
}

this.updateData();

This also explains why no API request appears in the browser network logs.

Operating System

No response

Relevant Configuration

No response

Additional Context

Relevant Console code

The issue appears to be in:

console/src/app/modules/policies/login-policy/login-policy.component.ts

The Console maps zero or missing lifetime values to 0 when loading the policy, while the Angular form validators require a minimum of 1 for several of those fields.

The corresponding template also uses min="1" for those inputs:

console/src/app/modules/policies/login-policy/login-policy.component.html

Workaround

Updating the Login Policy through the Management API works.

For example, changing the Default Redirect URI through:

http
PUT /management/v1/policies/login

succeeds for the affected organization.

Note that this endpoint updates the complete Login Policy rather than behaving like a field-level PATCH, so callers should preserve the existing policy values when using it as a workaround.