When LTI param contains single \n character the OAuth signature Moodle generates as LTI consumer doesn't match the signature the LTI provider generates. Probably because the browser replaces single \n character with \r\n when submitting the LTI HTML form.
I've run into a case where a user has \n character at the end of his last_name in Moodle and LTI fail to launch.
Instead of manually fixing a single param (fist_name, last_name, username...), I'm suggesting to loop over all LTI params and replace single \n characters with \r\n for all of them.
$param = str_replace("\n", "\r\n", $param);