If anyone wanted to attempt this. I can gladly help out, Test, Code review, but I lack the time to take it on fully nor am I a php expert. It seems there are a lot of oauth2 libraries for php already out there. So the main chunk of the effort would be adding it to media wiki.