feat: auth0 + discord + github + slack auth modules

This commit is contained in:
Nick
2019-04-21 21:43:33 -04:00
parent 8af21c02af
commit d7676513ac
20 changed files with 286 additions and 99 deletions

View File

@@ -0,0 +1,34 @@
/* global WIKI */
// ------------------------------------
// GitHub Account
// ------------------------------------
const GitHubStrategy = require('passport-github2').Strategy
const _ = require('lodash')
module.exports = {
init (passport, conf) {
passport.use('github',
new GitHubStrategy({
clientID: conf.clientId,
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL,
scope: ['user:email']
}, async (accessToken, refreshToken, profile, cb) => {
try {
const user = await WIKI.models.users.processProfile({
profile: {
...profile,
picture: _.get(profile, 'photos[0].value', '')
},
providerKey: 'github'
})
cb(null, user)
} catch (err) {
cb(err, null)
}
}
))
}
}

View File

@@ -0,0 +1,11 @@
key: firebase
title: Firebase
description: Firebase is Google's mobile platform that helps you quickly develop high-quality apps and grow your business.
author: requarks.io
logo: https://static.requarks.io/logo/firebase.svg
color: yellow darken-3
website: https://firebase.google.com/
isAvailable: false
useForm: false
props: {}