Identity JS

Skip to end of metadata
Go to start of metadata


This object represents a person's identity on a specific provider. A distinct Identity object is produced per each connected provider.

Note: Different providers supply different data. Thus, the availability of the data members of the Identity object depends on the specific provider.


Data Members

Field NameTypeDescription
providerstringThe name of the connected provider for this identity, in lowercase letters ("facebook", "yahoo", etc.).
providerUIDstringThe user ID provided by the connected provider. For Facebook this is an application-scoped ID, in which case a user can have more than one providerUID. The 'mappedProviderUIDs' array contains all of the provider UIDs mapped to the user.
Note: this field may be rather long for some providers; if you plan to store it in a DB the recommended field size is 300 characters.
providerUIDSigstringThis field is available only if the signIDs field of the global configuration object was set to 'true'. The providerUIDSig field holds the HMAC-SHA1 hash of following string: "<timestamp>_<provider>_<providerUID>", where <timestamp>, <provider>, <providerUID> are substituted with the corresponding values.
mappedProviderUIDsarray of objects

An array holding all the provider UIDs mapped to the user and the API keys associated with each provider UID.
Array objects are in the form of:

   providerUID : [the provider UID from facebook]
    apiKey : [the api key of the site that uses the application this provider UID belongs to]

isLoginIdentityBooleanIndicates whether this identity was the one that the user used in order to login.
nicknamestringThe person's nickname, this may be either the nickname provided by the connected provider or a concatenation of first and last name.
allowsLoginBooleanIndicates whether the user may use this identity for logging in to your site.
isExpiredSessionBooleanIndicates whether the session has expired for this provider (or is otherwise inactive). This field is relevant and available only if when calling the getUserInfo method you have set the includeAllIdentities parameter to 'true'.
lastLoginTimenumberThe time of the user's last login in Unix time format (i.e. the number of seconds since Jan. 1st 1970).
photoURLstringThe URL of person's full size photo.
thumbnailURLstringThe URL of person's thumbnail photo, when available.
firstNamestringThe person's first name. 
lastNamestringThe person's last name. 
genderstringThe person's gender. The value may be 'm', 'f', or 'u' for male, female, or unspecified.
agenumberThe person's age.
birthDaynumberThe day in month in which the person was born.
birthMonthnumberThe month in which the person was born.
birthYearnumberThe year in which the person was born.
emailstringThe person's email. 
countrystringThe person's country.
statestringThe person's state.
citystringThe person's city.
zipstringThe person's zip code.
profileURLstringThe URL of the person's profile.
languagesstringA comma-separated list of languages that the person speaks.
addressstringThe person's address. 
phonesarray of objectsThe person's phone numbers. 
educationarray of objectsThe person's education details.
honorsstringA comma-separated list of the person's honors.
publicationsarray of objectsThe person's publications' details.
patentsarray of objectsThe person's patents' details.
certificationsarray of objectsThe person's certifications' details.
professionalHeadlinestringThe person's professional headline, often the job title at the company.
biostringA description of the person's professional profile.
industrystringThe industry in which the person's company operates .
specialtiesstringThe person's specialties.
workarray of objectsA collection of the person's work experience.
skillsarray of objectsA collection of the person's skills.
religionstringThe person's religion.
politicalViewstringThe person's political views.
interestedInstringThe gender in which the person is interested.
relationshipStatusstringThe relationship status of the person.
hometownstringThe person's hometown.
favoritesJSON objectThe person's favorite things, including favorite books, movies, etc.
likesarray of objectsRetrieves up to 500 of the person's Facebook likes. 
followersCountintegerThe number of users following this user.
followingCountintegerThe number of users this user is following.
usernamestringThe person's Facebook user name.
localestringThe person's locale.
verifiedBooleanIndicates whether the person verified his email with Facebook.
timezonestringThe person's timezone.
missingPermissionsstringA comma-separated string that lists the differences between the general capabilities of Facebook and the requested capabilities. The requested capabilities are the ones checked in the console permissions, e.g., "missingPermissions": "Actions, Status, Photos".
samlDataJSON objectCustom SAML data. When mapping IdP attributes to identity fields, we allow mapping to a custom identity field, not only to an existing one. An attribute can be mapped to this custom identity field by mapping it to a name like "samlData.myField".
In cases where a SAML attribute has multiple instances and/or multiple values, all values from all instances will be collected into a JSON array.
Here is an example of how this attribute will be stored in the identity object:
"samlData": {
    "eduPersonScopedAffiliation": [
proxiedEmailstring Deprecated . A proxied email address is a storable channel through which your application can contact your users. The proxied email address can be used just like a regular email address. Proxied emails are currently supported by Facebook only. For more information, please refer to Facebook's proxied email * documentation (*deprecated).
You will receive the user's proxied email only if both of the following two conditions are fulfilled:

1. In your Gigya Site Setup process, you have checked the Enable retrieving emails in Facebook checkbox.

2. The user gave your application the permission to send him emails and chose to provide his proxied email instead of his regular email address (if condition 1 is fulfilled, while connecting to Facebook, the user will be prompted with a dialog to allow your application to send him emails).