We use the macOS SDK version 5.2.41751.1026. Our login code below. It works. Sometimes. But it takes 3 seconds. Why so long? Unfortunately more often the not it doesn’t work. Then it takes 40 seconds to tell us that username and password are wrong even though they’re correct. We even went so far as to hardcode the correct credentials. Complete insanity. Can someone from zoom please fix this SDK?
func login(
_ userName: String,
password: String,
rememberMe: Bool,
completion: @escaping LoginCompletion
) {
loginCompletion = completion
sdkAuthService?.logout()
print("ZoomAuthService: login: start time: \(Date())")
sdkAuthService?.login(userName, password: password, rememberMe: rememberMe)
}
func onZoomSDKLogin(_ loginStatus: ZoomSDKLoginStatus, failReason reason: String) {
print("ZoomAuthService:onZoomSDKLogin(_ loginStatus: \(loginStatus), failReason reason: \(reason)")
guard loginStatus == ZoomSDKLoginStatus_Success,
let user = sdkAuthService?.getAccountInfo()?.zoomUser else {
guard loginStatus == ZoomSDKLoginStatus_Failed else { return }
print("ZoomAuthService: login failed: end time: \(Date())")
loginCompletion?(
Result.failure(
NSError(
domain: "ZoomAuthService",
code: Int(loginStatus.rawValue),
userInfo: ["message": reason]
)
)
)
return
}
print("ZoomAuthService: login successfule: end time: \(Date())")
loginCompletion?(Result.success(user))
}