wikibase-edit
wikibase-edit copied to clipboard
Allow passing in direct Oauth2 tokens
I am using frontend JS to authenticate with OAuth2 via PKCE, and so I can't use the existing oauth options. I am able to get the bearer token and make authenticated requests with that, but I do not know how to supply the bearer token with this library. I understand this will have to be per-request but there still is no option for that.
I could try to have a look at it. Could you point to documentation on how to get such an OAuth2 token? Do you use it on wikidata.org or on another Wikibase instance with a particular OAuth extension?
Here's an example: https://github.com/wikimedia/apiclient-wiki/blob/master/js/apiclient.js. I also have my own implementation: https://github.com/PythonCoderAS/wikidata-animanga-db-matcher-frontend/blob/master/src/common/oauth.ts
And yes, I'm trying to use it on Wikidata.