TapTalk.io Omnichannel SDK provides some essential methods to handle user authentication.
Authenticate User (Optional)
You can authenticate the user that is currently logged in before calling openTapTalkLiveView. To do this, provide the user's full name and email by calling authenticateUser from the TapTalkLive class after initializing the SDK.
ParametersAUTH_TICKET: (String) existing auth ticket retrieved from the server
Logout
You can clear the currently authenticated user data using the logout method. After logout is finished, locally saved user and chat data will be cleared, and you may authenticate another user.
importio.taptalk.taptalklive.TapTalkLive;importio.taptalk.taptalklive.Listener.TTLCommonListener;...TapTalkLive.logout(newTTLCommonListener() { @OverridepublicvoidonSuccess(String successMessage) {// Successfully logged out } @OverridepublicvoidonError(String errorCode,String errorMessage) {// An error occured, but local data is still cleared }});
import io.taptalk.taptalklive.TapTalkLive;import io.taptalk.taptalklive.Listener.TTLCommonListener;...TapTalkLive.logout(object : TTLCommonListener() {overridefunonSuccess(successMessage: String?) {// Successfully logged out }overridefunonError(errorCode: String?, errorMessage: String?) {// An error occured, but local data is still cleared }})
Logout and Clear TapTalkLive Data
Call this method when you need to logout and clear all local cached data from Omnichannel SDK.