Android SDK 5.2.0 and 5.4.0 - Can either view public articles anonymously, or submit/view requests with auth, not both?



投稿日時:2025年3月26日

We're integrating the mobile SDK for Android. All of our articles are public. We need viewing requests and submitting requests to require authentication in the mobile app, but want our articles to remain public (in case a user is having trouble logging in to the app, etc.)

 

We're finding that any Zendesk article viewed triggers the mobile Android SDK into requiring a JWT identity, which it does not yet have because the email is not yet verified (our token swap requires verified emails). We then have to kill the app and re-launch it, and the user can only view the first article viewed.

 

Everything seems fine once that email has been verified and a fresh JWT identity can be fetched before each entry into a Zendesk activity.

 

Is it not possible for the mobile SDK to both:

1. allow an anonymous user to view public articles, and

2. require a token swap/identity to view support requests?

 


 


0

1

1件のコメント

More info — here's an example of the Zendesk-related log output we're seeing when using an AnonymousIdentity() to view one of our public support articles:

ZendeskIdentityStorage   D  Loading Anonymous identity
ZendeskIdentityStorage   D  Fetching UUID from preferences store
ZendeskAccessIntercepto  D  Anonymous Guide non-vote request, no need to intercept.
ZendeskIdentityStorage   D  Loading Anonymous identity
ZendeskIdentityStorage   D  Fetching UUID from preferences store
ZendeskIdentityManager   W  There is no stored access token, have you initialised an identity and requested an access token?
ZendeskIdentityStorage   D  Loading Anonymous identity
ZendeskIdentityStorage   D  Fetching UUID from preferences store
CachingInterceptor       D  Response not cached, loading it from the network. | https://vida95.zendesk.com/favicon.ico
ZendeskIdentityStorage   D  Loading Anonymous identity
ZendeskIdentityStorage   D  Fetching UUID from preferences store
ZendeskIdentityManager   W  There is no stored access token, have you initialised an identity and requested an access token?
ZendeskAccessIntercepto  D  Access token is required, intercepting.
ZendeskAccessIntercepto  E  The expected type of authentication is jwt.
                           The local identity is present.
                           The local identity is anonymous.
CachingInterceptor       D  Unable to load data from network. | https://vida95.zendesk.com/favicon.ico
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskIdentityManager   W  There is no stored access token, have you initialised an identity and requested an access token?
ZendeskAccessIntercepto  D  Access token is required, intercepting.
ZendeskAccessIntercepto  E  The expected type of authentication is jwt.
                           The local identity is not present.
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskIdentityManager   W  There is no stored access token, have you initialised an identity and requested an access token?
ZendeskAccessIntercepto  D  Access token is required, intercepting.
ZendeskAccessIntercepto  E  The expected type of authentication is jwt.
                           The local identity is not present.
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskNetworkInfoProvi  D  Adding Lollipop network callbacks...
ZendeskIdentityManager   W  There is no stored access token, have you initialised an identity and requested an access token?
ZendeskAccessIntercepto  D  Access token is required, intercepting.
ZendeskAccessIntercepto  E  The expected type of authentication is jwt.
                           The local identity is not present.

 

As the article and its attachments start to load under the AnonymousIdentity() the SDK tries to fetch https://vida95.zendesk.com/favicon.ico causing the Zendesk OkHttp interceptor to suddenly require a JwtIdentity() and from then on it fails to load any articles using the current AnonymousIdentity() until the app process is terminated and re-launched, or a valid  JwtIdentity() has been set.

 

This is problematic for us because once the user enters the HelpCenterActivity overview of knowledge base articles, the viewing of individual articles in ViewArticleActivity is handled entirely by the SDK from tap to close, and there doesn't appear to be any way to detect when the component enters this state, nor any way to clear the state programmatically.

 

Hope that helps!

— Jim

 

0


サインインしてコメントを残してください。

お探しのものが見つかりませんか?

新規投稿