I want to create a custom token without using a service account json. Tried the below config items: https://firebase.google.com/docs/auth/admin/create-custom-tokens#using_a_service_account_id
and used the below code to generate a token
admin.auth().createCustomToken(uid)
.then(function(customToken) {
// Send token back to client
})
.catch(function(error) {
console.log('Error creating custom token:', error);
});
Getting the below error :
'Failed to determine service account. Make sure to initialize the SDK with a service account credential. Alternatively specify a service account with iam.serviceAccounts.signBlob permission. Original error: Error: Error while making request: getaddrinfo ENOTFOUND metadata metadata:80. Error code: ENOTFOUND'
Used the latest "firebase-admin" npm module.
Kindly advice.