Curious to know to protect my link's get parameters in an email from manipulation. This code will be running server side to generate a URL for an email:
const url = new URL('https://e.dev.example.com')
url.search = new URLSearchParams({
url: 'https://dev.case.example.com/case/61914',
user: 21,
medium: 'email',
id: 'foobar-123'
})
console.log(url.toString())
Are there any good existing solution to sort the parameters (i.e. make them canonical) or encapsulate them somehow, hash the contents and then add that (short) hash to verify the payload later?