agates / peertube-plugin-auth-oauth2-mastodon

A PeerTube server plugin that adds support for external authentication via an OAuth 2.0 provider.
3 stars 1 forks source link

Access token error with Pleroma Oauth2 #1

Open Salmon-Bard opened 3 years ago

Salmon-Bard commented 3 years ago

I'm trying to use Oauth2 from Pleroma provider to login to Peertube but I'm facing the following issue where Access token
is not handled correctly

error[2/3/2021, 1:42:44 AM] Access token error. { "err": { "stack": "TypeError: Cannot read property 'body' of null\n at new Request (/var/www/peertube/storage/plugins/node_modules/servie/dist/node.js:148:30)\n at Object.fetch (/var/www/peertube/storage/plugins/node_modules/popsicle/dist/common.js:14:15)\n at /var/www/peertube/storage/plugins/node_modules/peertube-plugin-auth-oauth2-mastodon/main.js:88:18\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)", "message": "Cannot read property 'body' of null" } }

The Pelroma Oauth2 code is expecting a "grant_type=authorization_code" when sending authorization request but it seems that this plugin is not sending it with the request. I'm not sure if that is the issue !!!

Any suggestions or guidance to troubleshoot this issue

Thanks

agates commented 3 years ago

Sorry I've only just seen this -- is it configured to use the Authorization header or the URL parameter?