I'm trying to add an oauth2 flow for my Discord bot, but I'm running into an internal server error (HTTP 500) when trying to get an access token with the code from /oauth2/authorize and my client secret.
Extension page: Extension:OAuth (Developer guide)
Oauth application: Wiki-Bot
https://meta.miraheze.org/w/rest.php/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Fsettings.wikibot.de%2Foauth%2Fmw&client_id=a77984181bcec97ec924f04ea9f9e141&state=miraheze-1234somecode
got.post( 'https://meta.miraheze.org/w/rest.php/oauth2/access_token', { form: { grant_type: 'authorization_code', code: searchParams.get('code'), redirect_uri: 'https://settings.wikibot.de/oauth/mw', client_id: 'a77984181bcec97ec924f04ea9f9e141', client_secret: process.env['oauth-miraheze-secret'] } } )
(note that https://settings.wikibot.de/oauth/mw is currently redirecting to http://localhost:8080/ for testing purposes.)
I don't know if that helps, but here are the x-request-id and x-varnish of an example request ending in HTTP 500.
x-request-id: 'ff6fc4725ca64a68190f094a', x-varnish: '104566589',