Edit your talk page using OAuth

This is a very simple "Hello world" program to show how OAuth works for end users. If you so desire, you may download this file. If you're a developer, you might be interested in this other version.

So what is this doing?

  1. You click "Make an edit!"
  2. This app requests a temporary token from meta.wikimedia.org, then sends your browser to a page on meta.wikimedia.org to authorize this application.
  3. You login to meta.wikimedia.org (if you aren't already). Then you'll be prompted to give this application certain "grants"—actions that the application is allowed to take on your behalf. This application just asks to be able to create and edit pages, so it can post to your talk page (and create your talk page, if it doesn't already exist).
  4. Once you allow this application to act on your behalf, your browser is redirected back to our application with a verification code. This application uses that verification code and the temporary token from step 2 to get an authorization token.
  5. The app uses the authorization token to post to your talk page on test.wikipedia.org from your user account. Then it redirects you to the resulting diff.
  6. If all goes well, you see the diff that this application made and that it was done from your user account!
If you come back and click "Make an edit!" again before the browser session expires, the application will remember the authorization token and skip straight to step 5. And if you happen to have gone to Special:OAuthManageMyGrants on meta.wikimedia.org and revoked the access token in the mean time, it will receive an error when it tries to edit and will automatically go to step 2.