Skip to main content
JavaScript
const customer = Smile.customer.current();

if (customer) {
  // Handle the customer object
} else {
  // No customer is currently logged in
}

Documentation Index

Fetch the complete documentation index at: https://dev.smile.io/llms.txt

Use this file to discover all available pages before exploring further.

This method retrieves the currently logged-in customer from the cache, without making an API call.

Returns

This method returns a customer object if a customer is currently logged in, or null if no customer is authenticated.