Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a non-deprecated login method #50

Open
maxlath opened this issue Mar 29, 2017 · 5 comments
Open

use a non-deprecated login method #50

maxlath opened this issue Mar 29, 2017 · 5 comments

Comments

@maxlath
Copy link
Owner

maxlath commented Mar 29, 2017

Login request get the following warning:

Main-account login via \"action=login\" is deprecated and may stop working without warning. To continue login with \"action=login\", see [[Special:BotPasswords]]. To safely continue using main-account login, see \"action=clientlogin\"."

PR to fix this issue are very welcome!

@alemela
Copy link
Contributor

alemela commented Mar 29, 2017

Maybe the documentation you need is: https://www.mediawiki.org/wiki/API:Login

I think the process is quite similar:

  1. get the token using api.php?action=query&meta=tokens
  2. login in with api.php?action=clientlogin&username=Example&password=ExamplePassword&loginreturnurl=http://example.org/&logintoken=123ABC

@maxlath
Copy link
Owner Author

maxlath commented Sep 27, 2019

[Edit]: unfortunately, some instances limit the access to owner-only oauth tokens to users with a certain amount of contributions, making this mean of authentication non available to some users

@maxlath maxlath transferred this issue from maxlath/wikibase-token Dec 13, 2019
@diegodlh
Copy link
Contributor

owner-only oauth are actually way simpler to setup than I feared, so simply deprecating login by username and password could be an option?

Owner-only OAuth seem to be the preferred way for desktop apps which do not rely on a backend web service. However, registering an owner-only OAuth consumer may not be as simple for some users. This has been discussed in this thread for the Wikimedia Commons Android app.

I am currently developing a plugin for Zotero (using wikibase-edit) and I came across the same issue. Until I can set up a backend web service, the plugin will rely on either main-account or bot-password login. I asked for comments from the WikiCite and WikiData communities here and here.

@maxlath
Copy link
Owner Author

maxlath commented Feb 27, 2021

@diegodlh this client secret problem could be solved by using OAuth 2, which was designed for this use case (this presentation helped me get how that works), and is now available on Wikimedia mediawikis (via the Extension:OAuth page), but isn't supported by wikibase-edit yet

@diegodlh
Copy link
Contributor

diegodlh commented Mar 3, 2021

Thanks, @maxlath! So I guess the information in Wikimedia's OAuth app guidelines is outdated, as it says there that:

Apps that are meant to be installed separately for every user (e.g. mobile apps, browser plugins, desktop applications) must be registered individually by each user as owner-only

without mentioning the possibility of using OAuth 2. Well, it does, above, where it says

Make sure that ... The app is likely to protect the secrecy of its secret key (unless OAuth 2 without the 'Client is confidential' option is used)

but it is easy to miss that. I will check the presentation you sent me and update the guidelines accordingly.

I have also updated the thread in my project's talk page.

Hopefully, wikibase-edit will support OAuth 2 soon. If eventually I need to support it in my plugin, I will do so by submitting a pull request to this repo. In the mean time, I will use the old login/password method.

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants