This section provides the basic knowledge necessary to start using this SAP Customer Data Cloud Angular Web SDK library. We highly recommend reading this document before you start coding.
Name | Version |
---|---|
NodeJS | ^14.20.x |
Angular | ^13.0.x |
npm install sap-gigya-lib
import SAPGigyaModule
into the AppModule
import { SAPGigyaModule } from 'sap-gigya-lib';
Then configure the data that is required
@NgModule({
declarations: [
...
],
imports: [
...
SAPGigyaModule.forRoot({
apiKey: '<A_Valid_API_Key_For_Your_Site>',
cdn: '<Url_Data_Center>'
})
],
providers: [
...
],
bootstrap: [
...
]
})
Parameter | Description | Type | Mandatory | Default |
---|---|---|---|---|
apiKey | A valid API Key for your site | string | Yes | none |
cdn | URL data center | string | Yes | none |
lang | Language | string | No | en |
screenPrefix | prefijo del screenSet | string | No | Default |
includes | A comma-separated list of fields to include in the response. The possible values are: identities-active, identities-all, identities-global , loginIDs, emails, profile, data, memberships, regSource, isLockedOut, lastLoginLocation, rba, subscriptions, userInfo, preferences, groups, id_token. | string | No | profile,data |
screenLiteRegister | Start screen for register lite | string | No | gigya-subscribe-with-email-screen |
screenRegister | Start screen for register | string | No | gigya-register-screen |
screenProfile | Start screen for profile | string | No | gigya-update-profile-screen |
screenProgresiveProfile | Start screen for progresive profile | string | No | gigya-progresive-profile-screen |
screenOrganization | Start screen for organization | string | No | gigya-select-organization-screen |
More information: Click here!
Import the SAPGigyaService
service into your component
import { SAPGigyaService } from 'sap-gigya-lib'
Add dependency injection in your component's constructor
constructor(private sapgigyaService: SAPGigyaService) { }
Then invoke the functions you need.
MyLogin(): void {
// Show authentication form
this.sapgigyaService.Login();
// Get authentication status
this.sapgigyaService.loginInfo.subscribe((resp: any) => {
if (resp) {
...
}
});
}
Function | Arguments | Description | Return |
---|---|---|---|
Login | none | Show form login gigya | void |
Logout | none | Call API Logout gigya | void |
RegisterLite | none | Show form register lite gigya | void |
Register | none | Show register gigya | void |
EditProfile | none | Show form edit profile gigya | void |
DataProgresiveProfile | none | Show form progresive profile | void |
SelectB2BOrganization | none | Show form select organization | void |
GetAccountInfo | none | Call API AccountInfo | void |
GetOrganizationInfo | none | Call API GetOrganizationInfo | void |
Events | Description | Type | Return |
---|---|---|---|
loginInfo | Returns user authentication status | subscribe | boolean |
logoutInfo | Returns user logout status | subscribe | boolean |
accountInfo | Returns data from the user's session account | subscribe | Response or null |
organizationInfo | Returns data from the organization selected in session by the user | subscribe | Response or null |
Function | Arguments | Description | Return | Documentation |
---|---|---|---|---|
Accounts | none | Return gigya.accounts instance | gigya.accounts | Show Accounts Docs |
Ds | none | Return gigya.ds instance | gigya.ds | Show DS Docs |
Fidm | none | Return gigya.fidm instance | gigya.fidm | Show Fidm Docs |
Socialize | none | Return gigya.socialize instance | gigya.socialize | Show Socialize Docs |
If you need custom development, please do not hesitate to contact us.