loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Cover the "ttl" property?

Open Spark-star opened this issue 12 years ago • 2 comments

I created a model "Account" which extended from "User", I defined the property "ttl" like this:

{

  "name": "Account",
  "plural": "accounts",
  "base": "User",
  "Model": {
    "Master": "master"
  },
  "ttl": 31449600,
  "properties": {
    "cellphone": {
      "type": "string",
      "required": true
    }
  },
"relations": {
    "accessTokens": {
      "type": "hasMany",
      "model": "AccessToken",
      "foreignKey": "accountId"
    }
}
...
}

But when I use "Account.login" with given username and password , the responses' "ttl" has not been set to 31449600, which is still 1209600.

Is it a bug?

The max value the ttl can set is 31556926.

Spark-star avatar Oct 23 '14 08:10 Spark-star

@Spark-star This PR should have fixed the issue: https://github.com/strongloop/loopback/pull/956

Thanks

loay avatar Jan 26 '16 22:01 loay

Hi @Spark-star The issue is closed for now since the PR should have fixed it. If you are still running into problems, feel free to leave a comment and I will reopen the issue. Thanks.

loay avatar Jan 27 '16 15:01 loay