I want to authorize my login against a OAuth2 Server. It uses Grant Type Authorization Code according to this link:
Besides username I do also receive information about group-memberships.
What I already programmed is: Link to the login, callback function in Nextcloud, receives authorization. My idea now was to create the user @ nextcloud and assign it to the corresponding groups @ nextcloud. This works as well.
What I am currently facing is the problem, that I cannot log in this user. I tried \OCP\IUserSession->login() but it always returns false.
Thank you in advance!