How to get User Profile information

Last updated 11/01/2023

Before using the code snippet below, make sure you have added the initialization script tag.

During the authentication process, Bread & Butter collects information about the user, which we make available to your website via our getProfile call. This allows you to pull that information down to your site to fill in a form, display for the user, or store in a local database for future use.

The call below allows you to fetch information about the current user:

BreadButter.getProfile(function(user_profile, suggested_provider, device_verified) {
    console.log(‘GET PROFILE CALL COMPLETE’);
});


The following information is available (if provided by the user via authentication):

  • Email Address
  • First Name
  • Last Name
  • Profile Image URL
  • Identity Provider that the user authenticated with
  • Whether the user is authenticated or not