
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@adobe/react-native-aepedgeidentity
Advanced tools
Adobe Experience Platform Identity for Edge Network extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe.
@adobe/react-native-aepedgeidentity
is a wrapper around the iOS and Android Adobe Experience Platform Identity for Edge Network Extension to allow for integration with React Native applications.
The Adobe Experience Platform Identity for Edge Network extension has the following peer dependency, which must be installed prior to installing the identity extension:
See Requirements and Installation instructions on the main page
Install the @adobe/react-native-aepedgeidentity
package:
NPM:
npm install @adobe/react-native-aepedgeidentity
Yarn:
yarn add @adobe/react-native-aepedgeidentity
To initialize the SDK, use the following methods:
Refer to the root Readme for more information about the SDK setup.
In your React Native application, import the Identity extension as follows:
import {Identity} from '@adobe/react-native-aepedgeidentity';
Returns the version of the Identity for Edge Network extension
Syntax
extensionVersion(): Promise<string>
Example
Identity.extensionVersion().then(version => console.log("AdobeExperienceSDK: EdgeIdentity version: " + version));
This API retrieves the ECID that was generated when the app was initially launched. This ID is preserved between app upgrades, is saved and restored during the standard application backup process, and is removed at uninstall. A promise method which will be invoked once the Experience Cloud ID is available or rejected if an unexpected error occurred or the request timed out.
Syntax
getExperienceCloudId(): Promise<string>
Example
Identity.getExperienceCloudId().then(experienceCloudId => console.log("AdobeExperienceSDK: Experience Cloud Id = " + experienceCloudId));
Get all the identities in the Identity for Edge Network extension, including customer identifiers which were previously added. A promise method which will be invoked once the identities are available or rejected if an unexpected error occurred or the request timed out.
Syntax
getIdentities(): Promise<IdentityMap>
Example
Identity.getIdentities().then(identities => console.log("AdobeExperienceSDK: Get Identities = " + JSON.stringify(identities)));
Returns the identifiers in a URL's query parameters for consumption in hybrid mobile applications. The response will not return any leading & or ?, since the caller is responsible for placing the variables in the resulting URL in the correct locations. If an error occurs while retrieving the URL variables, the callback handler will return a null value. Otherwise, the encoded string is returned. An example of an encoded string is as follows: "adobe_mc=TS%3DTIMESTAMP_VALUE%7CMCMID%3DYOUR_ECID%7CMCORGID%3D9YOUR_EXPERIENCE_CLOUD_ID"
Syntax
getUrlVariables(): Promise<string>
Example
Identity.getUrlVariables().then(urlVariables => console.log("AdobeExperienceSDK: URL Variables = " + urlVariables));
Remove the identity from the stored client-side IdentityMap. The Identity extension will stop sending the identifier to the Edge Network. Using this API does not remove the identifier from the server-side User Profile Graph or Identity Graph.
Identities with an empty id or namespace are not allowed and are ignored.
Removing identities using a reserved namespace is not allowed using this API. The reserved namespaces are:
Syntax
removeIdentity(item: IdentityItem, namespace: string)
Example
let identityItem = new IdentityItem("user@example.com");
Identity.removeIdentity(identityItem, "Email");
Clears all identities stored in the Identity extension and generates a new Experience Cloud ID (ECID) . Using this API does not remove the identifiers from the server-side User Profile Graph or Identity Graph.
:information_source: The Identity for Edge Network extension does not read the Mobile SDK's privacy status and therefor setting the SDK's privacy status to opt-out will not clear the identities from the Identity for Edge Network extension.
For more details, see theMobileCore.resetIdentities API.
When this API is called with a valid advertising identifier, the Identity for Edge Network extension includes the advertising identifier in the XDM Identity Map using the namespace GAID (Google Advertising ID) in Android and IDFA (Identifier for Advertisers) in iOS. If the API is called with the empty string (""), null/nil, or the all-zeros UUID string values, the advertising identifier is removed from the XDM Identity Map (if previously set). The advertising identifier is preserved between app upgrades, is saved and restored during the standard application backup process, and is removed at uninstall.
Syntax
setAdvertisingIdentifier(advertisingIdentifier?: string)
Example
MobileCore.setAdvertisingIdentifier("adID");
Update the currently known identities within the SDK. The Identity extension will merge the received identifiers with the previously saved ones in an additive manner, no identities are removed from this API.
Identities with an empty id or namespace are not allowed and are ignored.
Updating identities using a reserved namespace is not allowed using this API. The reserved namespaces are:
Syntax
updateIdentities(identityMap: IdentityMap)
Example
let identityItem = new IdentityItem("user@example.com");
let map = new IdentityMap();
map.addItem(identityItem, "Email");
Identity.updateIdentities(map);
Defines a map containing a set of end user identities, keyed on either namespace integration code or the namespace ID of the identity. The values of the map are an array, meaning that more than one identity of each namespace may be carried. The format of the IdentityMap class is defined by the XDM Identity Map Schema.
For more information, please read an overview of the AEP Identity Service.
"identityMap" : {
"Email" : [
{
"id" : "user@example.com",
"authenticatedState" : "authenticated",
"primary" : false
}
],
"Phone" : [
{
"id" : "1234567890",
"authenticatedState" : "ambiguous",
"primary" : false
},
{
"id" : "5557891234",
"authenticatedState" : "ambiguous",
"primary" : false
}
],
"ECID" : [
{
"id" : "44809014977647551167356491107014304096",
"authenticatedState" : "ambiguous",
"primary" : true
}
]
}
Example
let map = new IdentityMap();
// Add an item
let identityItem = new IdentityItem("user@example.com");
map.addItem(identityItem, "Email");
// Remove an item
let identityItem = new IdentityItem("user@example.com");
map.removeItem(identityItem, "Email");
//Get a list of items for a given namespace
let namespacecheck = map.getIdentityItemsForNamespace("Email");
//Get a list of all namespaces used in current IdentityMap
let namespaces = map.getNamespaces();
//Check if IdentityMap has no identities
let hasNoIdentities = map.isEmpty();
Defines an identity to be included in an IdentityMap.
The format of the IdentityItem class is defined by the XDM Identity Item Schema.
Example
// Initialize
let item = new IdentityItem("identifier");
let item = new IdentityItem("identifier", AuthenticatedState.AUTHENTICATED, false);
//Getters
let id = item.id;
let state = item.authenticatedState;
let primary = item.primary
Defines the state an Identity Item is authenticated for.
The possible authenticated states are:
Syntax
export enum AuthenticatedState {
AUTHENTICATED = 'authenticated',
LOGGED_OUT = 'loggedOut',
AMBIGUOUS = 'ambiguous'
}
For more details, refer to the frequently asked questions page
FAQs
Adobe Experience Platform Identity for Edge Network extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe.
The npm package @adobe/react-native-aepedgeidentity receives a total of 13,243 weekly downloads. As such, @adobe/react-native-aepedgeidentity popularity was classified as popular.
We found that @adobe/react-native-aepedgeidentity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 30 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.