fix auth in php code exchange