maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
223 stars 24 forks source link

TypeError when setting credentials via wb config #101

Closed jhrdt closed 4 years ago

jhrdt commented 4 years ago

Desc

It is not possible to configure credentials via the wb config credentials <instance> command.

How to reproduce

wb --version
9.0.1
wb config credentials https://test.wikidata.org
credentials for instance https://test.wikidata.org not found

Response

Which authentication mechanism would you like to use to login to https://test.wikidata.org ?:
/!\ Beware that those will be stored in plain text on your computer
1 - OAuth tokens (recommended)
2 - username - password
- 2
username: bot
password: secret
TypeError: wbEdit(...).getAuthData is not a function
    at getTokenOrRetry (/home/****/.local/node-v10.16.3-linux-x64/lib/node_modules/wikibase-cli/lib/edit/init_credentials.js:86:24)
    at prompt.then (/home/****/.local/node-v10.16.3-linux-x64/lib/node_modules/wikibase-cli/lib/edit/init_credentials.js:79:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

What should happen

wb --version
8.2.0
wb config credentials https://test.wikidata.org
credentials for instance https://test.wikidata.org not found

Which authentication mechanism would you like to use to login to https://test.wikidata.org ?:
/!\ Beware that those will be stored in plain text on your computer
1 - OAuth tokens (recommended)
2 - username - password
- 2
username: bot
password: secret
Incorrect username or password entered. Please try again.
maxlath commented 4 years ago

hi @jhrdt, sorry for that, I published while depending on a local update of wikibase-edit which hadn't been published yet, that should be now fixed in v9.0.2 (patch: e5d4203)

jhrdt commented 4 years ago

hi @maxlath,

ich works now (v9.0.2).

Sorry for the late response.

Thanks