RocketChat oauth issue



  • Hello,

    I'm trying to install on rocket chat an oauth login but i'm improoving issues :
    Exception while invoking method 'login' Error: Failed to fetch identity from cloudron athttps://my.DOMAIN.ch/api/v1/session/login. Unexpected token < in JSON at position 0 at CustomOAuth.getIdentity (/app/code/bundle/programs/server/packages/rocketchat_custom-oauth.js:201:21) at Object.OAuth.registerService.query [as handleOauthRequest] (/app/code/bundle/programs/server/packages/rocketchat_custom-oauth.js:213:27) at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31) at middleware (packages/oauth.js:194:5) at /app/code/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 '

    What is the best config to do ? I've followedhttps://cloudron.io/developer/addons/#oauth but it's not working :-/



  • For using Cloudron auth, the package is already setup to do LDAP. This can be enabled in the rocket.chat settings. Is that not sufficient for your use-case? Also note that Rocket.chat supports multiple auth backends enabled at the same time.



  • @nebulon said inRocketChat oauth issue:

    For using Cloudron auth, the package is already setup to do LDAP. This can be enabled in the rocket.chat settings. Is that not sufficient for your use-case? Also note that Rocket.chat supports multiple auth backends enabled at the same time.

    Yeah, that can be enough but the oauth is really usefull when you're using multiple domain, big password and to avoid to get X entry in your keepass with X apps and X URL.

    I just want to try it, and eventually replace it (why not ask during app install the auth backend to use ?)



  • I understand the upsides of OAuth and initially we attempted to use OAuth in more apps, however more users prefered using ldap for tighter integration, as ldap usually gives a better user experience inside the app not leaving the app first for the redirect. Also the auto login mechanism in OAuth was sometimes confusing. We won't put up the effort at the moment to support multiple auth backends directly in the app installation/configuration out of the box as that increases the testing amount to ensure proper updates.