I’d like to support logging into a Meteor installation using MediaWiki OAuth. There are a few special things about MediaWiki’s OAuth installation, including the fact that you can’t dynamically specify a redirect back URL, so I cannot rely on the OAuth server to carry back state, as the Meteor oauth and accounts packages expect.
Through extensive experimentation, and lots of duplicating code from the oauth and oauth1 packages, I am at a step where I can make all the calls to MediaWiki correctly. I can get a request token, access token, and identify the user to get username and related info, and through log messages I verify that I have called OAuth._storePendingCredential with the correct information. I am able to render the end of login response.
My code is at this git repository.
However, I am stuck here. The popup closes correctly. But once I return to the main window, nothing happens. I was wondering if someone had a hint for me—either a complete solution, or pointer to the code that grabs the information from meteor_oauth_pendingCredentials, sets up a user object, and actually logs the user in.
Is this even the right approach?