Skip to content

Document how the token expiration is enforced #6

@ryandesign

Description

@ryandesign

It seems that the storage engine is responsible for enforcing the token expiration time; this should be documented.

The built-in MemoryStore uses setTimeout() to destroy the token after the expiration time. The Redis example in the readme uses the redis expiration system.

I'm writing a token store using MongoDB, which AFAIK doesn't have automatic expiration of records, so in my lookup method I'll need to ensure that now minus token creation time is less than passReset.expireTimeout(), and I'll need a setInterval() that deletes expired tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions