1
I am trying to update login data of a firebase user using the Node admin sdk. My code looks like this:
var uid = req.body.uid;
var objectUpdate = {
"displayName": "David Coelho"
};
admin.auth().updateUser(uid, objectUpdate)
.then(função(userRecord) {
// var id = userRecord.uid;
//usersRef.child(id).set(userDatabase (req, res))
res.status(200).json({
"return": "Atualizar usuário com sucesso"
})
})
.catch(função(erro) {
res.status(500).json({
"return": error
})
});
But I cannot update the user. Firebase sends me the following error message:
"Código": "auth / internal-error",
"Mensagem": "Ocorreu um erro interno."
Can someone help me?
Your code has a syntax error. The last
);
should be});
– Sergio
Thank you. I posted wrong here. But the problem persists.
– David Coelho