Compatibility with Mobile SDK
Context
Before starting the integration of authenticated messaging, you need to make sure to plan the deployment of the feature depending on your use case.
If you are planning on deploying this feature on the web and on the mobile SDK, there are a few things you need to know:
Will end-users authenticate on the app AND on the website?
If so, will you deploy authenticated messaging at the same time on the mobile app and the website?
How is authenticated messaging implemented on the Mobile SDK?
There is a full section dedicated to Mobile SDK where you will find the information regarding authenticated messaging.
Basically, you can choose between multiple authentication options:
Anonymous
For an unidentified user browsing your app.
Simple
For a logged in user in your app. You must pass a unique string identifier so that the visitor will retrieve his conversation history across multiple devices and platforms. The identifier that you pass must be unique and non-discoverable for each different logged-in user.
Secured
Important: if you want to start using the secured mode as a second step, we strongly advise that you implement the anonymous mode as a first step. Indeed, if you choose the simple mode first, your users will loose all their conversation history the day you decide to switch to the secured mode. If however you implemented the anonymous mode, they will be able to keep it.
Implementation scenarios
I want to launch on web only (no Mobile SDK used)
I want to launch on web only (and I do use the Mobile SDK at the same time but I don't want the feature there)
I want to launch on Mobile SDK only (no Web used)
I want to launch on Mobile SDK only (and I have the chat on my website but I don't want the feature to be deployed there)
I want to launch on both: web and Mobile SDK at the same time.
What is actually happening in the logout within the SDK that could restore the chat the next time the user is logging in again?
This is dependent on the type of activation that was made.
If the user was logged in anonymously, then the SDK keeps some information during the logout.
This is designed so that if an anonymous visitor starts chatting then logs into your app, the SDK calls to logout / activate (simple or secured) would keep the user's ongoing conversation / conversation history.
If the user was logged in "non-anonymously" (either with simple auth or secured auth), then the logout clears the whole user session. Please note however that if you log a user with an “already known" user id, the visitor session (history, parameters) will be pulled back. This is designed for chat history continuity across devices.
Last updated