草庐IT

firebase-auth

全部标签

javascript - 在 Firebase v3.0.1+ 中实现注销的最佳方式?更新后删除 Firebase.unauth

使用谷歌最近发布的新firebase3.0.1。之前,我们有Firebase.unauth()方法https://www.firebase.com/docs/web/api/firebase/unauth.html但它是旧API。我在新API中看不到任何相关内容:https://firebase.google.com/docs/reference/node/index-all您的解决方案是什么?尝试使用类似的东西:Object.keys(localStorage).forEach(key=>{if(key.indexOf('firebase')!==-1){localStorage.r

javascript - 如何创建 Firebase web user.reauthenticateWithCredential() 方法所需的 "credential"对象?

newdocs中的(不清楚的)示例:varuser=firebase.auth().currentUser;varcredential;//Prompttheusertore-providetheirsign-incredentialsuser.reauthenticateWithCredential(credential).then(function(){我应该如何创建这个credential对象?我试过:reauthenticateWithCredential(email,password)(类似登录方式)reauthenticateWithCredential({email,pa

javascript - 如何创建 Firebase web user.reauthenticateWithCredential() 方法所需的 "credential"对象?

newdocs中的(不清楚的)示例:varuser=firebase.auth().currentUser;varcredential;//Prompttheusertore-providetheirsign-incredentialsuser.reauthenticateWithCredential(credential).then(function(){我应该如何创建这个credential对象?我试过:reauthenticateWithCredential(email,password)(类似登录方式)reauthenticateWithCredential({email,pa

javascript - Firebase 更新对比集

正如标题所说,我无法理解update和set之间的区别。此外,文档也帮不了我,因为如果我改用set,更新示例的工作方式完全相同。文档中的更新示例:functionwriteNewPost(uid,username,title,body){varpostData={author:username,uid:uid,body:body,title:title,starCount:0};varnewPostKey=firebase.database().ref().child('posts').push().key;varupdates={};updates['/posts/'+newPost

javascript - Firebase 更新对比集

正如标题所说,我无法理解update和set之间的区别。此外,文档也帮不了我,因为如果我改用set,更新示例的工作方式完全相同。文档中的更新示例:functionwriteNewPost(uid,username,title,body){varpostData={author:username,uid:uid,body:body,title:title,starCount:0};varnewPostKey=firebase.database().ref().child('posts').push().key;varupdates={};updates['/posts/'+newPost

javascript - Firebase 权限被拒绝

我是编码新手,遇到了麻烦。我有这段代码可以将数据发送到firebaseapp.userid=app.user.uidvaruserRef=app.dataInfo.child(app.users);varuseridRef=userRef.child(app.userid);useridRef.set({locations:"",theme:"",colorScheme:"",food:""});但是,我一直收到错误:FIREBASEWARNING:setat/users/(GoogleID)failed:permission_denied2016-05-2322:52:42.707f

javascript - Firebase 权限被拒绝

我是编码新手,遇到了麻烦。我有这段代码可以将数据发送到firebaseapp.userid=app.user.uidvaruserRef=app.dataInfo.child(app.users);varuseridRef=userRef.child(app.userid);useridRef.set({locations:"",theme:"",colorScheme:"",food:""});但是,我一直收到错误:FIREBASEWARNING:setat/users/(GoogleID)failed:permission_denied2016-05-2322:52:42.707f

javascript - 如何构建 Cloud Functions for Firebase 以从多个文件部署多个函数?

我想为Firebase创建多个CloudFunctions并从一个项目同时部署它们。我还想将每个函数分离到一个单独的文件中。目前,如果我将它们都放在index.js中,我可以创建多个函数,例如:exports.foo=functions.database.ref('/foo').onWrite(event=>{...});exports.bar=functions.database.ref('/bar').onWrite(event=>{...});但是我想将foo和bar放在单独的文件中。我试过这个:/functions|--index.js(blank)|--foo.js|--ba

javascript - 如何构建 Cloud Functions for Firebase 以从多个文件部署多个函数?

我想为Firebase创建多个CloudFunctions并从一个项目同时部署它们。我还想将每个函数分离到一个单独的文件中。目前,如果我将它们都放在index.js中,我可以创建多个函数,例如:exports.foo=functions.database.ref('/foo').onWrite(event=>{...});exports.bar=functions.database.ref('/bar').onWrite(event=>{...});但是我想将foo和bar放在单独的文件中。我试过这个:/functions|--index.js(blank)|--foo.js|--ba

Golang 和 gcloud API : how to get an auth token

因为GoogleAutoML没有golang客户端,所以我不得不使用AutoMLhttp客户端。为此,需要来自谷歌的身份验证token,该token来自运行以下cli命令:gcloudauthapplication-defaultprint-access-token我目前正在使用一个也可以访问AutoML的凭据json文件来验证我的Golang服务器(示例用法)storageClient,err:=storage.NewClient(ctx,option.WithCredentialsFile(gcloudCredsJSONPath))我的问题是:如果我有一个JSON凭据文件,我将如何