Since the oauth patch hasn't made much progress upstream in recent months, I'm importing the oauth code into our phabricator/extensions repository (rPHEX)
rPHEX10a404e97697 is the patch as it existed for the past several months. The commit message for that commit explains my plan for migrating the patch out of the phab repo so that we don't have to continue rebasing a patch against upstream changes.
https://gerrit.wikimedia.org/r/#/c/205090/ is the fix for a couple of bugs that I discovered in the process of moving the patch and testing it in preparation for the upcoming phabricator upgrade.