diff --git a/client/src/components/UserUpdate.js b/client/src/components/UserUpdate.js index dcc43b4f1..5e5dda9d6 100644 --- a/client/src/components/UserUpdate.js +++ b/client/src/components/UserUpdate.js @@ -135,6 +135,7 @@ console.log("component will UNmount"); if (this.defaultValuesSet === false) { let user = JSON.parse(localStorage.getItem("loggedInUser")); + console.log("user", user); this.defaultValuesSet= true; this.refs.firstName.value = user.alias; console.log("setting defaults"); diff --git a/server/schema/schema.js b/server/schema/schema.js index 75a35857c..05faf6b05 100644 --- a/server/schema/schema.js +++ b/server/schema/schema.js @@ -360,6 +360,20 @@ try { */ + /* The user can sign up with many different possible social accounts. Currently this module only supports Github only. */ + + let authArray = authId.split("|"); + let socialAccountProvider = authArray[0]; + + if(socialAccountProvider !== 'github') { + + if (global.ERROR_LOG === true) { console.log("[ERROR] " + MODULE_NAME + " -> authenticate -> onValidated -> onUserFound -> Social Account Provider not Supoorted. "); } + if (global.ERROR_LOG === true) { console.log("[ERROR] " + MODULE_NAME + " -> authenticate -> onValidated -> onUserFound -> socialAccountProvider = " + socialAccountProvider); } + + callBackFunction(global.DEFAULT_FAIL_RESPONSE, { error: err }); + return; + } + let newUser = new User({ alias: alias, authId: authId,