panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

max_age defined as string rather than number #279

Closed ruiengana closed 4 years ago

ruiengana commented 4 years ago

Describe the bug In AuthorizationParameters interface max_age is defined as string rather than number.

To Reproduce

<setup client>
const max_age = 86400;
const request = await client.requestObject({
  scope,
  response_type,
  redirect_uri,
  state,
  nonce,
  max_age,
  claims,
  code_challenge,
  code_challenge_method,
});

}

Steps to reproduce the behaviour:

  1. Define max_age as number, e.g. 86400
  2. Initiate a client and produce a RequestObject with max_age claim

Expected behaviour Expected RequestObject to accept max_age claim as number.

Environment:

Additional context

ruiengana commented 4 years ago

Thanks!