# ttlLoginRule · FT4 TypeScript client · Chromia Docs (concept)

> ttlLoginRule(ttl: number): LoginConfigSimpleRule Creates a login rule which represents "this rule will be valid for ttl seconds",
where ttl is the input to

Source: https://docs.chromia.com/pages/ft4-ts-client/functions/authentication.ttlLoginRule/

Function

# ttlLoginRule

* ```signature
  ttlLoginRule(ttl: number): LoginConfigSimpleRule
  ```

  Creates a login rule which represents "this rule will be valid for `ttl` seconds",
  where `ttl` is the input to the function. Goes great with the functions for representing
  time. E.g.,

  Plain text

  ```
  ttlLoginRule(30) // Valid for 30 seconds
  ttlLoginRule(minutes(10)) // Valid for 10 minutes
  ttlLoginRule(days(2)) // Valid for 2 days
  ...
  ```

  #### Parameters

  + ttl: number

    for how long (in seconds) the rule is valid.

  #### Returns [LoginConfigSimpleRule](https://docs.chromia.com/pages/ft4-ts-client/types/authentication.LoginConfigSimpleRule/)

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/functions/authentication.ttlLoginRule.html)Generated API reference, mirrored from the live docs
