Я пытаюсь проверить токен с сервера nodejs. Я использовал приведенный ниже код.
var admin = require('firebase-admin');
var serviceAccount = require('path/to/serviceConfig.json');
admin.initializeApp({
projectId: "projectid",
credential: admin.credential.cert(serviceAccount),
databaseURL: "databaseurl"
});
admin.auth().verifyIdToken(token)
.then(function(decodedToken) {
console.log("DecodedToken"+ decodedToken);
})
я получаю ошибку ниже.
FirebaseAppError: Error while making request: getaddrinfo ENOTFOUND www.googleapis.com. Error code: ENOTFOUND
at FirebaseAppError.FirebaseError [as constructor] (C:\Programs\Studies\auth-service-master\node_modules\firebase-admin\lib\utils\error.js:42:28)
at FirebaseAppError.PrefixedFirebaseError [as constructor] (C:\Programs\Studies\auth-service-master\node_modules\firebase-admin\lib\utils\error.js:88:28)
at new FirebaseAppError (C:\Programs\Studies\auth-service-master\node_modules\firebase-admin\lib\utils\error.js:123:28)
at C:\Programs\Studies\auth-service-master\node_modules\firebase-admin\lib\utils\api-request.js:209:19
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
errorInfo: {
code: 'app/network-error',
message: 'Error while making request: getaddrinfo ENOTFOUND www.googleapis.com. Error code: ENOTFOUND'
},
codePrefix: 'app'
}
Я использую план свободной искры. Не уверен, что проблема здесь ....