Page MenuHomePhabricator

Create OAuth 2 Hello World app
Closed, ResolvedPublic

Description

We have an OAuth Hello World app which is a nice way of testing MediaWiki's OAuth 1 functionality. We should have something similar for OAuth 2.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think we should re-prioritize this. We have more time now, and the lack of such an app made testing OAuth 2 changes more annoying.

T403487#11154642 has some basic hello world scripts in Python (though without a GUI), for both OAuth 1 and OAuth 2.

@matmarex, please have a look and let me know what you think! I haven’t tested with a real client_id yet.
https://phabricator.wikimedia.org/F66343855

Nice, I tested it out locally and everything seems to work. I will want to spend some time reading more about OAuth 2 myself to make sure that we're doing things completely correctly. I'm hoping to do it later this week.

Some notes:

  • The case 'logout': code is unused
  • The action=identify endpoint gives a warning: "Unrecognized value for parameter \"uiprop\": registration" – I think it needs to be registrationdate instead
  • You removed some configs and documentation, I think it would be nice to keep them. In particular, $mytalkUrl is now undefined, but still used
  • You reformatted most of the code (or maybe some tool did that automatically?), which makes it a bit difficult to see the differences between the OAuth 1 and OAuth 2 versions :(
    • Some of the minor changes are nice to have though, like changing the var_export to json_encode. It'd be good to do that for the OAuth 1 version too.

In the meantime, could you also:

I know this is a lot, let me know if you run into any trouble, or if we should meet up and talk through the details. And sorry for not getting back to you faster!

Okay! Thanks for the feedback @matmarex! I'll have those set up and let you know how it goes :)

It looks like I have to create the tool before setting up a repo for the project. I just applied for membership, and my request is still pending.