我正在尝试在mi服务器
中为firebase创建自定义令牌import * as admin from 'firebase-admin';
var serviceAccount = require('PATH_TO_CREDENTIALS');
console.log(serviceAccount);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://URL.firebaseio.com"
});
admin.auth().createCustomToken("some-uid").then(function(customToken){
console.log(customToken);
}
我按照文档中的所有步骤操作 1. https://firebase.google.com/docs/admin/setup
但我收到一个错误:属性'createCustomToken'不存在
我能做什么?