Implemented Nextcloud OAuth2 Hack

Fixed: OAuth2 authentication via Nextcloud(tested Nextcloud 17.0.2-18.0.0)
Todo: actually use the profile data: Fullname and Email in Profile
This commit is contained in:
Bojan Hartmann 2020-01-22 22:28:03 +01:00
parent 70f5326099
commit 7bba07ccbf
2 changed files with 26 additions and 0 deletions

View file

@ -10,6 +10,7 @@ OAuth.registerService('oidc', 2, null, function (query) {
var expiresAt = (+new Date) + (1000 * parseInt(token.expires_in, 10));
var userinfo = getUserInfo(accessToken);
if (userinfo.ocs) userinfo = userinfo.ocs.data; // Nextcloud hack
if (debug) console.log('XXX: userinfo:', userinfo);
var serviceData = {};