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

if (customer) {
  // Handle the customer object
} else {
  // No customer is currently logged in
}
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.