summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-09-17 13:23:08 +0300
committerLauri Ojansivu <x@xet7.org>2018-09-17 13:23:08 +0300
commit53a020a23afb7ae4031ec08965a61da2bc85560d (patch)
tree8ab094e08cc0afa416a42efcda184b08bb93a953
parent2e52ff9e9d153448f03bd56f59f58517149251e0 (diff)
downloadwekan-53a020a23afb7ae4031ec08965a61da2bc85560d.tar.gz
wekan-53a020a23afb7ae4031ec08965a61da2bc85560d.tar.bz2
wekan-53a020a23afb7ae4031ec08965a61da2bc85560d.zip
- Remove OAuth2, until it is fixed.
Thanks to xet7 !
-rw-r--r--.meteor/packages2
-rw-r--r--CHANGELOG.md1
-rw-r--r--models/users.js46
-rw-r--r--server/authentication.js45
4 files changed, 47 insertions, 47 deletions
diff --git a/.meteor/packages b/.meteor/packages
index d428111c..990f8717 100644
--- a/.meteor/packages
+++ b/.meteor/packages
@@ -31,7 +31,7 @@ kenton:accounts-sandstorm
service-configuration@1.0.11
useraccounts:unstyled
useraccounts:flow-routing
-salleman:accounts-oidc
+#salleman:accounts-oidc
# Utilities
check@1.2.5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0db31702..2b32ba5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
This release removes the following new features:
- Remove IFTTT rules, until they are fixed.
+- Remove OAuth2, until it is fixed.
Thanks to GitHub user xet7 for contributions.
diff --git a/models/users.js b/models/users.js
index 01673e4f..070cbc40 100644
--- a/models/users.js
+++ b/models/users.js
@@ -488,29 +488,29 @@ if (Meteor.isServer) {
return user;
}
- if (user.services.oidc) {
- const email = user.services.oidc.email.toLowerCase();
-
- user.username = user.services.oidc.username;
- user.emails = [{ address: email, verified: true }];
- const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase();
- user.profile = { initials, fullname: user.services.oidc.fullname };
-
- // see if any existing user has this email address or username, otherwise create new
- const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]});
- if (!existingUser)
- return user;
-
- // copy across new service info
- const service = _.keys(user.services)[0];
- existingUser.services[service] = user.services[service];
- existingUser.emails = user.emails;
- existingUser.username = user.username;
- existingUser.profile = user.profile;
-
- Meteor.users.remove({_id: existingUser._id}); // remove existing record
- return existingUser;
- }
+// if (user.services.oidc) {
+// const email = user.services.oidc.email.toLowerCase();
+//
+// user.username = user.services.oidc.username;
+// user.emails = [{ address: email, verified: true }];
+// const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase();
+// user.profile = { initials, fullname: user.services.oidc.fullname };
+//
+// // see if any existing user has this email address or username, otherwise create new
+// const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]});
+// if (!existingUser)
+// return user;
+//
+// // copy across new service info
+// const service = _.keys(user.services)[0];
+// existingUser.services[service] = user.services[service];
+// existingUser.emails = user.emails;
+// existingUser.username = user.username;
+// existingUser.profile = user.profile;
+//
+// Meteor.users.remove({_id: existingUser._id}); // remove existing record
+// return existingUser;
+// }
if (options.from === 'admin') {
user.createdThroughApi = true;
diff --git a/server/authentication.js b/server/authentication.js
index 6310e8df..8a74ebf7 100644
--- a/server/authentication.js
+++ b/server/authentication.js
@@ -62,28 +62,27 @@ Meteor.startup(() => {
Authentication.checkAdminOrCondition(userId, normalAccess);
};
- if (Meteor.isServer) {
-
- if(process.env.OAUTH2_CLIENT_ID !== '') {
-
- ServiceConfiguration.configurations.upsert( // eslint-disable-line no-undef
- { service: 'oidc' },
- {
- $set: {
- loginStyle: 'redirect',
- clientId: process.env.OAUTH2_CLIENT_ID,
- secret: process.env.OAUTH2_SECRET,
- serverUrl: process.env.OAUTH2_SERVER_URL,
- authorizationEndpoint: process.env.OAUTH2_AUTH_ENDPOINT,
- userinfoEndpoint: process.env.OAUTH2_USERINFO_ENDPOINT,
- tokenEndpoint: process.env.OAUTH2_TOKEN_ENDPOINT,
- idTokenWhitelistFields: [],
- requestPermissions: ['openid'],
- },
- }
- );
- }
- }
+// if (Meteor.isServer) {
+//
+// if(process.env.OAUTH2_CLIENT_ID !== '') {
+//
+// ServiceConfiguration.configurations.upsert( // eslint-disable-line no-undef
+// { service: 'oidc' },
+// {
+// $set: {
+// loginStyle: 'redirect',
+// clientId: process.env.OAUTH2_CLIENT_ID,
+// secret: process.env.OAUTH2_SECRET,
+// serverUrl: process.env.OAUTH2_SERVER_URL,
+// authorizationEndpoint: process.env.OAUTH2_AUTH_ENDPOINT,
+// userinfoEndpoint: process.env.OAUTH2_USERINFO_ENDPOINT,
+// tokenEndpoint: process.env.OAUTH2_TOKEN_ENDPOINT,
+// idTokenWhitelistFields: [],
+// requestPermissions: ['openid'],
+// },
+// }
+// );
+// }
+// }
});
-