We occasionally run into issues where the clock on the requesting server is slightly ahead of the clock on the API server. Validation fails because the IsReplayRequest method in the SignatureValidator class returns true. This is because the difference in seconds is negative but you are storing them in an unsigned long, resulting in a huge positive value.
If you are ok with allowing request from the past or future up to the RequestMaxAgeInSeconds then this quick fix works:
ulong timestampDifference;
if (serverTotalSeconds > requestTotalSeconds) {
timestampDifference = serverTotalSeconds - requestTotalSeconds;
} else {
timestampDifference = requestTotalSeconds - serverTotalSeconds;
}
if (timestampDifference > RequestMaxAgeInSeconds) {
return true;
}
Are you still maintaining this project? If so can you make this correction and publish and update to Nuget?
We occasionally run into issues where the clock on the requesting server is slightly ahead of the clock on the API server. Validation fails because the IsReplayRequest method in the SignatureValidator class returns true. This is because the difference in seconds is negative but you are storing them in an unsigned long, resulting in a huge positive value.
If you are ok with allowing request from the past or future up to the
RequestMaxAgeInSecondsthen this quick fix works:Are you still maintaining this project? If so can you make this correction and publish and update to Nuget?