AuthCallback is not working in window console

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!!”);
}
}

Hey @luca.cavallotti,

Thanks for using the dev forum!

Console applications do not handle messaging by default you would have to add it in manually. Similar to what this developer did in the Fully Customizable SDK: joinSession Event callbacks are not fired - #11 by mtaha

Thanks!
Michael

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.