Description

Entity for a refresh token. This is used for refreshing access tokens. Refresh tokens are used to get new access tokens without having to re-authenticate.

Hierarchy

  • BaseMongoEntity
    • RefreshTokenEntity

Constructors

  • Parameters

    • userId: string

      The id of the user this refresh token belongs to

    • jti: string

      An identifier for the refresh token (used when manually cancelling the session)

    • expiry: Date

      Expiry time for the refresh token

    • metadata: Record<string, unknown>

      Arbitrary metadata to store for the refresh token

    Returns RefreshTokenEntity

Properties

_id: ObjectId
createdAt: Date
delFlg: 0 | 1
expiry: Date

Expiry time for the refresh token

id: string
jti: string

An identifier for the refresh token (used when manually cancelling the session)

metadata: Record<string, unknown>

Arbitrary metadata to store for the refresh token

updatedAt: Date
userId: string

The id of the user this refresh token belongs to

Generated using TypeDoc