sap-gigya-web-sdk
v1.0.1
Published
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.
Downloads
6
Maintainers
Readme
SAP Gigya Web SDK for Angular
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.
Requirements:
| Name | Version | |--|--| | NodeJS | ^14.20.x | | Angular | ^13.0.x |
Installation:
npm install sap-gigya-web-sdk
Configuration:
import SAPGigyaModule
into the AppModule
import { SAPGigyaModule } from 'sap-gigya-web-sdk';
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: [
...
]
})
Available Options:
| 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!
Usage:
Import the SAPGigyaService
service into your component
import { SAPGigyaService } from 'sap-gigya-web-sdk'
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) {
...
}
});
}
Available functions
| 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 |
Available events
| 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 |
Available functions of instance Web SDK
| 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 |
Support:
If you need custom development, please do not hesitate to contact us.
Author:
Donations
Hello! I hope you're having a great day. Our project is progressing, and we're looking for support to keep growing. If you'd like to contribute and help us continue making a positive impact, we invite you to make a donation. Every contribution, big or small, makes a significant difference.