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) => {
|
passport.use('local-phone', new LocalStrategy(localPhoneOptions, async (phone, fbuid, done) => {
|
||||||
try {
|
try {
|
||||||
|
console.log('PASSPORT - local-phone');
|
||||||
firebase_admin.auth().getUserByPhoneNumber(phone)
|
firebase_admin.auth().getUserByPhoneNumber(phone)
|
||||||
.then(function(userRecord) {
|
.then(function(userRecord) {
|
||||||
if (userRecord && userRecord.toJSON().uid == fbuid) {
|
if (userRecord && userRecord.toJSON().uid == fbuid) {
|
||||||
@ -97,7 +98,7 @@ passport.use('local-phone', new LocalStrategy(localPhoneOptions, async (phone, f
|
|||||||
|
|
||||||
// JWT
|
// JWT
|
||||||
passport.use('jwt', new CustomStrategy(async (req, done) => {
|
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);
|
const token = ((req && req.headers && req.headers['x-access-token']) ? req.headers['x-access-token'] : null);
|
||||||
|
|
||||||
if (!token) {
|
if (!token) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user