Skip to content

maxAge option incorrectly handles values expressed in number of milliseconds #346

Closed
@zaak

Description

@zaak

As stated in the docs:

maxAge: the maximum allowed age for tokens to still be valid. Currently it is expressed in milliseconds or a string describing a time span zeit/ms. Eg: 1000, "2 days", "10h", "7d". (...)

But if you pass a number, it's converted to string by ms call here, as there's no typeof check for options.maxAge. Because of this all the following validation logic is broken in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions