Jump to content
  • 0

OAuth2 Client extension - Config for Discord



Hey guys,

I'm having some trouble getting an OAuth2 client to work with MediaWiki.  The install is stock standard, and I have full access to my web server.  I had an oauth2 client working with DokuWiki, so the oauth API server and Discord are configured correctly.  My gut feeling is that I'm confusing the namespaces or similar in MediaWiki?  Any ideas?


```$wgOAuth2Client['client']['id']     = ''; // The client ID assigned to you by the provider  (By whom?  My API provider?)
$wgOAuth2Client['client']['secret'] = ''; // The client secret assigned to you by the provider

$wgOAuth2Client['configuration']['authorize_endpoint']     = ''; // Authorization URL
$wgOAuth2Client['configuration']['access_token_endpoint']  = ''; // Token URL  (?)
$wgOAuth2Client['configuration']['api_endpoint']           = ''; // URL to fetch user JSON (I assume this is my API provider, not directly via Discord?)
$wgOAuth2Client['configuration']['redirect_uri']           = ''; // URL for OAuth2 server to redirect to (I've seen conflicting info about this setting?)

$wgOAuth2Client['configuration']['username'] = 'username'; // JSON path to username  (Can't find info about where these are located, relative to the current version of mediawiki)
$wgOAuth2Client['configuration']['email'] = 'email'; // JSON path to email

$wgOAuth2Client['configuration']['scopes'] = 'openid email profile'; //Permissions  (I assume this can be skipped/removed for oauth2 only authentication?)


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.