Fogmeister | 2024-10-28 11:20:09 UTC | #1
Using the mobile SDK (Android, and iOS) we are seeing the chat history fine.
But... when we log out of the app and log in with a different user the chat is still showing the history of the previous user.
Is there a way to clear the chat data when a user logs out so that we don't leak any chat history between accounts?
Thanks
Fogmeister | 2024-10-29 10:02:33 UTC | #2
Hey, just nudging to get a response to this.
Thanks
tamasi878 | 2024-10-29 10:50:37 UTC | #3
Hi Fogmeister,
Can you give some details on the login/logout process? Are you using any authentication provider?
Thank you
Fogmeister | 2024-10-29 10:47:42 UTC | #4
Hi @tamasi878
No "r" in Fogmeister :smiley:
The log out process is one that we use with our own authentication provider separate from the Genesys chat.
The app requires users to log in to use the app. Then inside the app the user can tap a button to "Chat to us". At which point we instantiate the Genesys ChatController using the SDK as per the docs.
We are passing in some customAttributes to the messengerAccount when we create the chatController.
This has allowed the chat back end to authenticate the user and get information from the back end about the user.
But after the user logs out and a new user logs in those customAttributes change.
Something like this....
let messengerAccount = MessengerAccount(
deploymentId: deploymentId,
domain: domain,
logging: loggingEnabled
)
messengerAccount.customAttributes = [
"chatAgent": "mobile",
"deviceDetails": "iOS",
"userNumber": userNumber,
"accountNumber": accountNumber,
]
chatController = ChatController(account: messengerAccount)
But when the chat is presented after a new user logs in. The chat history for the old number is visible.
Thanks
tamasi878 | 2024-10-29 10:56:28 UTC | #5
I'm sorry, I edited your name. :-D
Please check this section in the developer center, this is a generic explanation of Authenticated Messaging. This will handle the different user logins and this is the next feature we will release this year. Does it fit into your application?
The Clear Conversation feature will be delivered next year only, I don't have exact timeline yet for that.
Fogmeister | 2024-10-29 12:47:25 UTC | #6
Thanks @tamasi878
Thanks for the link. I think this is what the web team implemented on the web chat for the site.
When the authenticated messaging is implemented in the mobile SDK will this also mean that only the chat history of the authorised user is shown?
i.e. if user A logs in and starts chatting with support. Then user A logs out. Then user B logs in and starts chatting with support. User B won't see user A's history?
Do you have an ETA for the authenticated messaging in the mobile SDK just so I can feedback to the team?
Thanks
tamasi878 | 2024-10-30 12:05:20 UTC | #7
Hi,
Yes, this is right. With authenticated messaging User B won't see the messages of User A in the explained scenario.
The ETA for the Authenticated Messaging on mobile is December 2024.
system | 2024-11-29 12:05:26 UTC | #8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 30084