backport and fix for oauth method override (bug 844159)