Oauth Atlassian Connect with JWT Not working anymore

I have oauth token request that work previously, but somehow its not working anymore, it return “invalid JWT signature”

here is my code to generate the JWT token:

public string GenerateJwtToken(string instanceBaseUrl, string userKey, string clientId, string secret)
            var now = ConvertToUnixTimestamp(DateTime.UtcNow);
            var exp = now + EXPIRY_SECONDS;
            var payloads = new Dictionary<string, object>
                    { "iss", "urn:atlassian:connect:clientid:" + clientId  },
                    { "sub", "urn:atlassian:connect:userkey:" + userKey  },
                    { "tnt", instanceBaseUrl  },
                    { "aud", AUTHORIZATION_SERVER_URL  },
                    { "iat", now  },
                    { "exp", exp  }

            return JsonWebToken.Encode(payloads, secret, JwtHashAlgorithm.HS256);

It looks like you are missing your query string hash, see here: https://developer.atlassian.com/static/connect/docs/latest/concepts/understanding-jwt.html