Auto-Authenticate people into Messenger when embedded into Cloudradial
R
Ricky Balmaceda
Merged in a post:
Messenger for Cloud Radial asks users to log in. Users are already authenticated through Cloud Radial, can we pass this authentication through and sign users in automatically?
D
Delcie Bean
Messenger for Cloud Radial asks users to log in. Users are already authenticated through Cloud Radial; can we pass this authentication through and sign users in automatically?
R
Robert Picard
I looked this up, for example Zendesk Chat can do this.
In order for it to work with chat genie you would need to allow users to sign in with a token (this could be passed as part of this script) to bypass the need to enter the code.
Other checks can be added to ensure that you're accesing it form the proper account, one thing to note doing so would allow us to 'impersonate' a user and access their chat console.
Core API - Web Widget - Zendesk Developer Portal
Using this code, then you would add the following javascript code to the header scripts section in CloudRadial.
https://developer.zendesk.com/api-reference/widget/core/#prefill
<script>
function CloudRadialUserInit(email, displayname, companyname) {
//console.log(email);
//console.log(displayname);
//console.log(companyname);
zE('webWidget', 'prefill', {
name: {
value: displayname,
readOnly: true // optional
},
email: {
value: email,
readOnly: true // optional
}
});
}
function CloudRadialUserLogout() {
zE('webWidget', 'prefill', {
name: {
value: '',
readOnly: false
},
email: {
value: '',
readOnly: false
}
});
}
</script>