naystack - v1.5.10
    Preparing search index...

    Function getUserIdFromAccessToken

    • Decodes an access token and returns the user id from the JWT payload.

      Parameters

      • OptionalrefreshToken: string

        JWT access token string (parameter name is legacy).

      Returns number | null

      User id (number) or null if the token is invalid, expired, or missing.