web-crawling-utils
Version:
Common useful utils for web crawling and automation scripts
13 lines (12 loc) • 409 B
TypeScript
/**
* Generate a JWT token for a given user ID.
* @param userId - The ID of the user.
* @returns The generated JWT token.
*/
export declare const generateToken: (userId: string) => string;
/**
* Verify a JWT token and extract the user ID.
* @param token - The JWT token to verify.
* @returns The decoded token if valid, or throws an error.
*/
export declare const verifyToken: (token: string) => any;