Identity

Identity

# new Identity(identityMap)

Creates a new Identity instance from the provider parameters.
Parameters:
Name Type Description
identityMap Object Identity parameters
Properties
Name Type Attributes Description
providerUserId string <optional>
User ID
accessToken string Access token
providerId string Provider ID
trusted boolean True if it's trusted

Methods

# (static) createCustomIdentity(customProviderName, userId, accessToken) → {Identity}

Creates a custom identity.
Parameters:
Name Type Description
customProviderName string Custom provider name.
userId string Unique user ID for the custom provider.
accessToken string Password of the user for the custom provider. It's a string, provided by the developer and it will be required by the GetSocial SDK to validate any future intent to add this same identity to another user.
Returns:
Instance for your custom provider.
Type
Identity

# (static) createFacebookIdentity(accessToken) → {Identity}

Creates a Facebook identity with specified access token.
Parameters:
Name Type Description
accessToken string Token of Facebook user returned from FB SDK.
Returns:
New instance for Facebook user with specified access token.
Type
Identity

# (static) createTrustedIdentity(trustedProviderName, accessToken) → {Identity}

Create trusted identity.
Parameters:
Name Type Description
trustedProviderName string Your trusted provider name.
accessToken string Access token for your trusted provider.
Returns:
Instance for your trusted provider.
Type
Identity