Topic on Talk:OAuth/Owner-only consumers

The path "" does not contain a valid key file

4
Kofl007 (talkcontribs)

We try to generate a owner-only consumer registration, but it fails with the error attached.


Wasnt able to find any documentation about the key file?


[16597c234d997bb55b95091f] /mediawiki/index.php/Special:OAuthConsumerRegistration/propose Lcobucci\JWT\Signer\Key\FileCouldNotBeRead from line 14 of /var/lib/mediawiki-1.35.4/extensions/OAuth/vendor/lcobucci/jwt/src/Signer/Key/FileCouldNotBeRead.php: The path "" does not contain a valid key file

Kofl007 (talkcontribs)

Fix:


openssl genrsa -out oauth.key 2048

openssl rsa -in oauth.key -pubout -out outh.cert

$wgOAuth2PrivateKey = "/oauth/oauth.key"

$wgOAuth2PublicKey = "/oauth/outh.cert"

Paulxu20 (talkcontribs)

Hello, I am having the same problem but can not get it work using the fix... It is giving an error saying can not find the key file, what is the absolute path I should use for "oauth.key" and "outh.cert"? I tried to put them under the wiki main folder, or the OAuth folder, or public_html, none of them worked. Could you share more info about how to fix this?

Appreciate it! Thank you!

Tgr (WMF) (talkcontribs)

Most of the documentation assumes you are using the simpler SHA-1 based secrets, not public keys.

Reply to "The path "" does not contain a valid key file"