3 weeks ago
Hi there,
I have created a parent site with a single child and put some JS logic in the parent's WebSDK configuration.
Then I created a simple web page and correctly referenced the Gigya library (based on the child ApiKey).
When the page loads, the logic inside the WebSDK configuration does not fire. I have tried simply adding a console.log() but nothing,
Could you please help me?
Thanks,
Valerio
Hi,
After loading gigya.js did you tried to perform any flow?
Can you try to run showScreenSet and check?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please try to remove the "customEventMap" and try.
If it does not help please open a case to the CDC SDK team and we will check.
Hi, completely removing the customEventMap from the child works.
Anyway, it's strange because according to the documentation, the custom logic of the parent should be merged into the child.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you please share the code you are using.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the code in the parent site:
{
// A comma-delimited list of provider names to enable.
enabledProviders: '*',
// Define the language of Gigya's user interface and error message.
lang: 'en',
// Bind globally to events.
customEventMap: {
eventMap: [{
events: '*',
args: [function(e) {
return e;
}],
method: function(e) {
console.log(e);
if (e.fullEventName === 'login') {
// Handle login event here.
} else if (e.fullEventName === 'logout') {
// Handle logout event here.
}
//START RESET PWD HANDLING
function getParameterByName(name) {
var url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
function removeParams() {
window.history.pushState({}, document.title, "/");
}
window.gigya_custom_screen_shown = window.gigya_custom_screen_shown || false;
if (getParameterByName("forgotPwd") && window.gigya_custom_screen_shown === false) {
window.gigya_custom_screen_shown = true;
gigya.accounts.showScreenSet({
screenSet: 'Default-RegistrationLogin',
startScreen: 'gigya-forgot-password-screen',
onAfterSubmit: function(pwdSubmit) {
if (pwdSubmit.response.status !== "FAIL") {
removeParams();
}
}
});
}
//END RESET PWD HANDLING
}
}]
}
}
I tried just adding a console.log but it doesn't work. Could it depend on the parent/child configuration?
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.