User Profile

When authenticating using a third-party service such as Facebook or Twitter, user profile information will often be available. Each service tends to have a different way of encoding this information. To make integration easier, Passport normalizes profile information to the extent possible.

Normalized profile information conforms to the contact schema established by [Joseph Smarr][schema-author]. The common fields available are outlined in the following table.

provider {String}
The provider with which the user authenticated (facebook, twitter, etc.).
id {String}
A unique identifier for the user, as generated by the service provider.
displayName {String}
The name of this user, suitable for display.
name {Object}
familyName {String}
The family name of this user, or "last name" in most Western languages.
givenName {String}
The given name of this user, or "first name" in most Western languages.
middleName {String}
The middle name of this user.
emails {Array} [n]
value {String}
The actual email address.
type {String}
The type of email address (home, work, etc.).
photos {Array} [n]
value {String}
The URL of the image.

Note that not all of the above fields are available from every service provider. Some providers may contain additional information not described here. Consult the provider-specific documentation for further details.

Supported by