Custom OAuth - read role from structure? synchronize user after settings change?

#1

Hello

We use rocket.chat 1.0.2 running the docker images.
We added a custom OAuth account to authenticate users against our forum. That works quite nice so far for the most important things (creating the user).

The settings we use for the invisionboard software are here.

We now tried to synchronize the groups / roles as well, but when we turn that on the roles are erased. The groups come in a structure:
https://invisioncommunity.com/developers/rest-api?endpoint=core/me/GETindex

It seems the custom oauth tries to extract similiar structures: /master/app/custom-oauth/server/custom_oauth_server.js and master/app/models/server/models/Roles.js - but I’m not very fluent in javascript, so I don’t know if that should work or if we can specify some query for the group name.

Is it possible to read the group name and use it as a role?
Does the role need to exist prior to creating the user?

And should rocket.chat synchronize these fields if the user logged in once? If we change the settings? Or is this sync only done for new users?

Thanks a lot!

Server Setup Information

  • Version of Rocket.Chat Server: 1.0.2
  • Operating System: Docker on Ubuntu 18.04
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes? used the docker-compose instructions
  • NodeJS Version: the one in the docker image
  • MongoDB Version: 4.0
  • Proxy: apache
  • Firewalls involved: no