In DoNodeNativeAuth() sample, the declaration tContextData aContinueData; should be tContextData aContinueData = NULL. Without the initialization, you'll get error code = -14097 (invalid continuation data)
tContextData aContinueData;
tContextData aContinueData = NULL