@ -1,36 +0,0 @@
|
||||
/* global WIKI */
|
||||
|
||||
// ------------------------------------
|
||||
// Firebase Account
|
||||
// ------------------------------------
|
||||
|
||||
// INCOMPLETE / TODO
|
||||
|
||||
const FirebaseStrategy = require('passport-github2').Strategy
|
||||
const _ = require('lodash')
|
||||
|
||||
module.exports = {
|
||||
init (passport, conf) {
|
||||
passport.use(conf.key,
|
||||
new FirebaseStrategy({
|
||||
clientID: conf.clientId,
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL,
|
||||
scope: ['user:email']
|
||||
}, async (req, accessToken, refreshToken, profile, cb) => {
|
||||
try {
|
||||
const user = await WIKI.models.users.processProfile({
|
||||
providerKey: req.params.strategy,
|
||||
profile: {
|
||||
...profile,
|
||||
picture: _.get(profile, 'photos[0].value', '')
|
||||
}
|
||||
})
|
||||
cb(null, user)
|
||||
} catch (err) {
|
||||
cb(err, null)
|
||||
}
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
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: {}
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 1.6 KiB |