on 2023 Apr 03 12:41 PM
HI Team,
Problem:
When we update email address from profile update page, email list is getting updated with new one. Hence Even After updating email address, I am still able to login with OLD email address. It means, I am able to login with both OLD and NEW email Addresses.
Requirement:
Once new email address is updated and verified, I should be able to login only with new email and OLD email should not be allowed any more.
Yes, I know that, There is a verified and unverified email information available and profile email address is also available. But can anyone help me to disable all other email's as soon as new email is verified or similar ?
Any help will be appreciable
Regards,
Eldhos
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Eldhos,
Please, refer to accounts.setAccountInfo REST and find the following parameter removeLoginEmails.
It removes email(s) you specified from emails and loginIDs objects in CDC.
So, you can remove all emails except new one and you will be able to login only with new one.
Hope it helped you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see 3 cases of how you can reach it:
1) Once you are using Screen-Sets implementation, you can navigate to Javascript and write something similar to this:
// Called after a form is submitted.
onAfterSubmit: function (event) {
if(event.screen === 'gigya-login-screen' && event.response.errorCode === 0) {
gigya.accounts.getAccountInfo({
include: 'profile,loginIDs',
callback: function(e) {
console.log('Included: loginIDs,profile', e);
/*
Write here logic which email(s) should be removed.
You can remove all, except this one which is in profile.email.
*/
gigya.accounts.setAccountInfo({
/* Put here emails are dinamically taken from previous step(example values are hardcoded). */
removeLoginEmails: 'the_oldest_one@gmail.com,older_one@gmail.com,old_one@gmail.com',
callback: function(r) {
console.log('removeLoginEmails', r);
}
});
}
});
}
}
Above is an example that will be triggered every time when User is logged in.
You can specify more complex and efficient logic based on your requirements.
2) You can try to do it in WEB SDK Configurations
onGigyaServiceReady: function () {
...
gigya.accounts.addEventHandlers({
onLogin: function(r) {
console.log('onLogin', r);
...
}
}
3) You can create Data Flow, which on background sometimes checks pretty much the same as in 1 case and remove inappropriate emails from loginIDs.
Hope one of these meets your needs and requirements or helps you investigate your case more deeply.
4) Use Extensions 😉
User | Count |
---|---|
2 | |
1 | |
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.