Firebase user update with Node SDK

1

I'm trying to update login data from a firebase user using the Node sdk admin. 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 can not update the user. Firebase sends me the following error message:

"Código": "auth / internal-error",
"Mensagem": "Ocorreu um erro interno."

Can anyone help me?

    
asked by anonymous 03.12.2016 / 19:17

0 answers