This is a problem with the current implementation. The good news, it’s already fixed on 1.7.0.
Therefore you need to wait a few more days until 1.7.0 comes out or run an unstable version. Alternatively, you can check if mailcow offers a way to disable the requirement for state parameter.
I am not sure what is the issue, I am getting the same error message to OAuth from MailCow. any help will be appreciated.
Internal Server Error
InternalOAuthError: Failed to obtain access token
at OAuth2CustomStrategy.OAuth2Strategy._createOAuthError (/hedgedoc/node_modules/passport-oauth2/lib/strategy.js:423:17)
at /hedgedoc/node_modules/passport-oauth2/lib/strategy.js:177:45
at /hedgedoc/node_modules/oauth/lib/oauth2.js:191:18
at ClientRequest. (/hedgedoc/node_modules/oauth/lib/oauth2.js:162:5)
at ClientRequest.emit (node:events:390:28)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)