Description
Hi there!
It seems AuthCallback is not working with console application using C# wrapper.
OnAuthenticationReturn callback it is never fired and so the authentication process is never completed.
The problem is only with the console, instead with a web application it works correctly.
public void SdkAuthentication(string appKey, string appSecret) {
ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(OnAuthenticationReturn);
ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet(OnLoginRet);
ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLogout(OnLogout);
ZOOM_SDK_DOTNET_WRAP.AuthParam authParam = new ZOOM_SDK_DOTNET_WRAP.AuthParam();
authParam.appKey = appKey;
authParam.appSecret = appSecret;
SDKError error = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authParam);
if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_UNINITIALIZE == error)
{
throw new Exception("SDKERR_UNINITIALIZE");
}
if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_UNAUTHENTICATION == error)
{
throw new Exception("SDKERR_UNAUTHENTICATION");
}
_logService.Log($"ZOOM SDKAuth request result: {error}");
}
private void OnAuthenticationReturn(AuthResult result)
{
if (ZOOM_SDK_DOTNET_WRAP.AuthResult.AUTHRET_SUCCESS == result)
{
_logService.Log($“Authentication OK!”);
}
else//error handle.todo
{
throw new Exception(“Error!!”);
}
}