Having issue when trying to authenticate | Community
Skip to main content

Having issue when trying to authenticate

  • February 14, 2022
  • 6 replies
  • 0 views

We are using loginUser(jwt) to authenticate a user, but the only data saved (and retrieved) is the external_id.

The jwt contains also a name and an email.

 

This happens on both platforms (Android and iOS).

 

6 replies

Hey Ovidiu,
 
Can you confirm to the following details:
 
  • Which Zendesk SDK and version you're authenticating users for?
  • Is the JWT payload constructed as noted in our JWT token documentation?
 
Also, can you share the code you're using to supply the JWT token to the SDK?
 
Best,

  • Author
  • February 18, 2022

Hey Christopher,

Thanks for your response.

 

We are using Android SDK and also iOS SDK. 

Version 2.1.0 (I think it's the latest one).

We followed this steps:

Android SDK: https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/android/getting_started/

iOS SDK: https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/ios/getting_started/

 

Yes, it is. When we test our JWT into the https://jwt.io/ it returns the correct data.

 

Android login/logout/open chat implementation

 

iOS login/logout/open chat implementation

 

Note: we are developing our application in Flutter so the SDKs are integrated in the native code.

The flow is represented like this: Flutter Dart code -> Native code (Android/iOS) -> Zendesk SDK (Android/iOS)


Mick11
  • February 23, 2022

Hi Oividu,

Unfortunately this is a currently product limitation (mentioned in this article). Only the external ID is surfaced in Agent Workspace today. We are currently working to bring the Name and Email through at well. No harm in including it in your JWT payload today, it won't break the authentication step, and soon it will be surfaced in Agent Workspace to your agents. You won't need to update your SDK implementation.


Abe12
  • March 7, 2022

What value should be in the `kit` field in the JWT header?  The docs are not clear on this point.


Greg29
  • March 7, 2022

Hi @abe12! I'm guessing you're referring to the `kid` and for that, you'll want to use the ID that is generated here, starting with "app_...".


Abe12
  • March 8, 2022

Perfect thanks @greg29!