a
This commit is contained in:
parent
43d1da46ec
commit
06fd628922
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user