[英]Zendesk SDK Swift iOS JWT Authentication failed
I'd added the Zendesk SDK to an iOS Project built using Swift, the Zendesk API authenticates vs my own auth service generating a JWT token. 身份驗證似乎工作正常,因為使用支持聊天的用戶信息顯示在支持面板中。
但是,當嘗試從幫助中心訪問支持文章時,它不會顯示任何內容並返回此錯誤:
CredStore - performQuery - Error copying matching creds. Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
ptcl = htps;
"r_Attributes" = 1;
sdmn = "Web Password";
srvr = "avenue8help.zendesk.com";
sync = syna;
}
Zendesk 使用我們自己的端點生成的 JWT 令牌反映了 Zendesk 所需的正確信息和結構。
任何幫助將非常感激
PS:甚至嘗試使用給定的令牌通過 API 訪問幫助中心信息,但無法訪問此類信息
喬治
我在 Zendesk 支持 SDK 時遇到了同樣的問題。
解決方案:
根據 Zendesk Doc 更新 Zendesk pod。 -- https://developer.zendesk.com/embeddables/docs/ios_support_sdk/sdk_add#adding-the-sdk-with-cocoapods
檢查您的 jwt 令牌 API 是否正常工作。
jwt 令牌響應必須采用這種格式 -- { "jwt": "{your_jwt_token_response}" }
有關更清晰的信息,請查看此 -- https://develop.zendesk.com/hc/en-us/articles/360001075248
檢查您的 Zendesk Mobile SDK 設置是否正確添加。 Select JWT 在身份驗證方法中。 將您的 JWT 服務器 URL 添加到 JWT ZE6B391A8D2C4D459702A23A8B68Z 部分。 檢查您的 iOS 代碼。 初始化:
Zendesk.initialize(appId: "your_appId", clientId: "your_clientId",zendeskUrl: "your_zendesk_url")
Support.initialize(withZendesk: Zendesk.instance)
您可以從 Zendesk 儀表板的 Mobile SDK 部分下找到您的 app_id、client_id 和 zendesk_url。 設置身份:
let identity = Identity.createJwt(token: id)
Zendesk.instance?.setIdentity(identity)
取票:
let requestListController = RequestUi.buildRequestList()
navigationController?.pushViewController(requestListController, animated: true)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.