Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
Caven edited this page Jan 31, 2024 · 1 revision

getAuthenticatedUser

Retrieves the currently authenticated user.

Usage

import { type User, getAuthenticatedUser } from '@heybrostudio/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