naystack - v1.5.10
    Preparing search index...

    Function generateAccessToken

    • Generates a JWT access token for the user (2-hour expiry).

      Parameters

      • id: number

        User id to encode in the JWT payload.

      • signingKey: string

        Secret used to sign the token (typically SIGNING_KEY env var).

      Returns string

      Signed JWT string.