But that does not work for me. It results in an error in the master app because after login it redirect to the redirectURI without modifying it. So the oauth proxy on the master app is never used.
After digging through the code a bit, I modified it to this: