This commit is contained in:
David Arranz 2019-08-28 19:12:33 +02:00
parent 43d1da46ec
commit 06fd628922

View File

@ -70,6 +70,7 @@ const localPhoneOptions = {
passport.use('local-phone', new LocalStrategy(localPhoneOptions, async (phone, fbuid, done) => {
try {
console.log('PASSPORT - local-phone');
firebase_admin.auth().getUserByPhoneNumber(phone)
.then(function(userRecord) {
if (userRecord && userRecord.toJSON().uid == fbuid) {
@ -97,7 +98,7 @@ passport.use('local-phone', new LocalStrategy(localPhoneOptions, async (phone, f
// JWT
passport.use('jwt', new CustomStrategy(async (req, done) => {
console.log('PASSPORT - JWTTTTTTTTTTT');
const token = ((req && req.headers && req.headers['x-access-token']) ? req.headers['x-access-token'] : null);
if (!token) {