add user.isGithubCool check
if user signs up with github, they become GithubCool.
This commit is contained in:
@ -19,28 +19,14 @@
|
|||||||
"password": {
|
"password": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"facebook": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"twitter": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"google": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"github": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"linkedin": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"tokens": {
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
"progressTimestamps": {
|
"progressTimestamps": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"default": []
|
"default": []
|
||||||
},
|
},
|
||||||
|
"isGithubCool": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"lowercase": true,
|
"lowercase": true,
|
||||||
@ -123,12 +109,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
"resetPasswordToken": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"resetPasswordExpires": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"completedBonfires": {
|
"completedBonfires": {
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
@ -170,21 +150,10 @@
|
|||||||
"type": "number",
|
"type": "number",
|
||||||
"default": 0
|
"default": 0
|
||||||
},
|
},
|
||||||
"needsSomeDataModeled": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"needsMigration": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"sendMonthlyEmail": {
|
"sendMonthlyEmail": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
"challengesHash": {
|
|
||||||
"type": {}
|
|
||||||
},
|
|
||||||
"currentChallenge": {
|
"currentChallenge": {
|
||||||
"type": {}
|
"type": {}
|
||||||
},
|
},
|
||||||
@ -205,10 +174,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": []
|
"default": []
|
||||||
},
|
|
||||||
"uncompletedChallenges": {
|
|
||||||
"type": "array",
|
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validations": [],
|
"validations": [],
|
||||||
|
@ -65,6 +65,9 @@ var passportOptions = {
|
|||||||
if (email) {
|
if (email) {
|
||||||
userObj.email = email;
|
userObj.email = email;
|
||||||
}
|
}
|
||||||
|
if (provider === 'github-login') {
|
||||||
|
userObj.isGithubCool = true;
|
||||||
|
}
|
||||||
return userObj;
|
return userObj;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user