When looking through the code, I accidentaly noticed that there seems to be an integrated oauth2 provider in nextcloud 12…
just as it seems it is not working