gbv / login-server

Login and connect accounts with multiple identity providers
https://coli-conc.gbv.de/login/
MIT License
32 stars 32 forks source link

MediaWiki strategy currently does not work #40

Closed stefandesu closed 5 years ago

stefandesu commented 5 years ago

On the callback, the server replies with "Internal Server Error" and the logs output:

Error: Not enough or too many segments
    at /srv/cocoda/login-server/node_modules/passport-mediawiki-oauth/lib/passport-mediawiki-oauth/oauth.js:173:22
    at passBackControl (/srv/cocoda/login-server/node_modules/passport-mediawiki-oauth/lib/passport-mediawiki-oauth/oauth-patches.js:114:15)
    at IncomingMessage.<anonymous> (/srv/cocoda/login-server/node_modules/passport-mediawiki-oauth/lib/passport-mediawiki-oauth/oauth-patches.js:134:13)
    at IncomingMessage.emit (events.js:194:15)
    at IncomingMessage.EventEmitter.emit (domain.js:441:20)
    at endReadableNT (_stream_readable.js:1103:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

This is hard to debug. I already created an issue in passport-mediawiki-oauth asking for help: https://github.com/milimetric/passport-mediawiki-oauth/issues/2

stefandesu commented 5 years ago

The error was that we needed to specify Wikidata as the baseURL for the strategy: https://github.com/milimetric/passport-mediawiki-oauth/issues/2#issuecomment-513711239

I enabled Wikidata for login now.