see here: Unable to exchange token during in-client oauth flow (and other issues) - #2 by ash.provost