Added GitHub and Slack authentication integrations

This commit is contained in:
NGPixel
2017-02-24 16:50:04 -05:00
parent ee16b82f17
commit 9976842e45
13 changed files with 60 additions and 13 deletions

View File

@@ -123,7 +123,7 @@ router.post('/users/create', (req, res) => {
if (!validator.isEmail(nUsr.email)) {
return res.status(400).json({ msg: 'Invalid email address' })
} else if (!validator.isIn(nUsr.provider, ['local', 'google', 'windowslive', 'facebook'])) {
} else if (!validator.isIn(nUsr.provider, ['local', 'google', 'windowslive', 'facebook', 'github', 'slack'])) {
return res.status(400).json({ msg: 'Invalid provider' })
} else if (nUsr.provider === 'local' && !validator.isLength(nUsr.password, { min: 6 })) {
return res.status(400).json({ msg: 'Password too short or missing' })