我试图在iOS上使用和令牌交换流中的访问令牌。它因错误而失败
'https://my.tapkey.com/api/v1/Auth/Auth/UserInfo?t=tk' completed with code 400错误信息并不能说明什么。我如何调试到底出了什么问题?
发布于 2021-08-06 09:34:29
TKMServiceFactory.userManager.logInAsync返回一个TKMPromise。https://developers.tapkey.io/mobile/ios/reference/TapkeyMobileLib/latest/Classes/TKMPromise.html
为了获得更多关于这个问题的信息,你必须抓住错误。
.catchOnUI { asyncError -> [TYPE] in
let error = asyncError.syncSrcError
}错误可能是一个TKMError,其中包含ErrorCodes和ErrorMessages:https://developers.tapkey.io/mobile/ios/reference/TapkeyMobileLib/latest/Classes/TKMError.html
编辑
当使用自己的身份提供程序时,用户必须先注册,然后才能登录:
https://developers.tapkey.io/api/authentication/identity_providers/#working-with-users
https://stackoverflow.com/questions/68678588
复制相似问题