最近搜索


没有最近搜索

Failed to decode JWT

已回答


已于 2022年6月02日 发布

Hi you guys,

I took the steps according to the documentation to enable authenticated visitors for messaging with Zendesk SDKs. https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/web/enabling_auth_visitors/?_ga=2.268652913.1675815841.1654150203-1035270265.1654150203. But I experienced a problem as below. Give me some help to solve the thing, please 


0

7

7 条评论

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Toan,

Can you share the corresponding code snippets so we can see how you're handling the JWT? 
 
Thanks 

0


We build the mobile app, which integrated with Zendesk, by using flutter library dart_jsonwebtoken

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Toan,

Unfortunately we don't support flutter, so the amount of debugging I can do is pretty limited. Have you checked to see if the JSON can be properly decoded using a tool like JWT.io? This may help you to isolate where the request is being malformed. Lastly, I've went ahead and deleted your code snippet as it shows your keys.

Apologies for not being able to be more assistance.

0


Toan Nguyen Did you manage to fix the issue ?

0


I'm getting: The JWT provided could not be decoded when trying to log in.

The JWT token is decoded as it should (via JWT.io).

I'm using the latest iOS SDK version - ZendeskSDKMessaging - 2.27.0

 

The secret and the kidare defined and used to construct the JWT token. Any idea what I've missed?

0


Just to add: 

The Zendesk is initialized before logging in. 

Zendesk.initialize(withChannelKey: Constants.channelKey,
                           messagingFactory: DefaultMessagingFactory()) { result in
            switch result {
            case .success(let zendesk): 
            	// Here I login with new JWT token generated by our server
            	login()
            case .failure(let error): break
            }
        }

0


image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Sion, 

 

Are you still having this issue? If so, I can pull you into a ticket to get a better look. 

0


请先登录再写评论。

找不到所需的内容?

新建帖子