Change help center from anonymous to JWT identified not working in Android
Good morning!
In my app, we are going to add the ability to be authenticated in Zendesk to give users a better customer support experience. The thing is that in Android and iOS, the SDK behaves differently. In iOS, if you use an anonymous identity in a JWT environment, you can see the public articles, but the private ones remain hidden, and if the user signs in, then, the identity becomes a JWT identity and the private articles appear in the Help Center.
In Android, the behaviour is completely different. If we are using a Zendesk configuration which expects a JWT identity, if we want to enter the help center as an anonymous user, an error is raised and no articles are shown. So, we've created two appIds, one for the anonymous environment and another one for the JWT identity and it works, but not at all. If the user logs out or signs in to a same session, the help center expects the first identity set when the app starts. So, if the user starts the app as anonymous, then, when the user signs in, the Zendesk SDK says that it expects an anonymous identity and not a JWT identity, so, no articles are shown. And if the user starts the app as a logged user, and does a logout, the Zendesk SDK says that it expects a JWT identity and it receives an Anonymous identity.
The Android Zendesk SDK is configured using the next steps:
In my app, we are going to add the ability to be authenticated in Zendesk to give users a better customer support experience. The thing is that in Android and iOS, the SDK behaves differently. In iOS, if you use an anonymous identity in a JWT environment, you can see the public articles, but the private ones remain hidden, and if the user signs in, then, the identity becomes a JWT identity and the private articles appear in the Help Center.
In Android, the behaviour is completely different. If we are using a Zendesk configuration which expects a JWT identity, if we want to enter the help center as an anonymous user, an error is raised and no articles are shown. So, we've created two appIds, one for the anonymous environment and another one for the JWT identity and it works, but not at all. If the user logs out or signs in to a same session, the help center expects the first identity set when the app starts. So, if the user starts the app as anonymous, then, when the user signs in, the Zendesk SDK says that it expects an anonymous identity and not a JWT identity, so, no articles are shown. And if the user starts the app as a logged user, and does a logout, the Zendesk SDK says that it expects a JWT identity and it receives an Anonymous identity.
The Android Zendesk SDK is configured using the next steps:
- When the user opens the app, if the user is not logged in to the app, then, Zendesk does the init with the anonymous appId, we set the identity as anonymous and then put the Zendesk Instance in the Support Instance.
- If the user does a sign-in, the Zendesk config changes to the JWT identity appId, we fetch the Zendesk JWT from our backend and set the identity as JWT Identity using the JWT from our backend. And then, we put the Zendesk Instance in the Support Instance.
- If the user does a logout, the Zendesk config changes to the Anonymous identity appId, set the identity as Anonymous and then, set the Support instance again with the new Zendesk config.
This change of identity is not working properly, as the one that is expected is the first one set on the app start. Any idea on how to make this work? And why in iOS works perfectly without 2 appIds?
Thanks!
Thanks!
-
Hi Miquel Castanys,
Thanks for bringing this to our attention. As you may already know, we have created a ticket regarding this issue. Kindly check your email for new updates. Thanks!
댓글을 남기려면 로그인하세요.
1 댓글