Skip to content
Branko Conjic edited this page Feb 8, 2024 · 2 revisions

getAuthenticatedUser

Retrieves the currently authenticated user.

Usage

import { type User, getAuthenticatedUser } from '@lemonsqueezy/lemonsqueezy.js';

const { error, data, statusCode } = await getAuthenticatedUser();

Type Declarations

/**
 * Retrieve the authenticated user.
 *
 * @returns A user object.
 */
declare function getAuthenticatedUser(): Promise<FetchResponse<User>>;

Returns

{
	statusCode: number | null;
	error: Error | null;
	data: User | null;
}

Source

Source ~ Type ~ Test

Clone this wiki locally