草庐IT

firebase_authentication

全部标签

javascript - express 和 Passport 错误 : Unknown authentication strategy "login"

我目前正在使用在线教程运行一个简单的测试MEAN堆栈:Node.jsExpress.jsPassport.js这是应用程序文件:app.jsvarexpress=require("express");varmongoose=require("mongoose");varpath=require("path");varbodyParser=require("body-parser");varcookieParser=require("cookie-parser");varsession=require("express-session");varflash=require("connec

java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘解决

最近遇到了 java.sql.SQLException:Unabletoloadauthenticationplugin'caching_sha2_password'.这个报错。主要原因8.x版本的验证模块和之前版本不同:5.x版本是:default_authentication_plugin=mysql_native_password8.x版本就是:default_authentication_plugin=caching_sha2_password 解决方案①更新mysql驱动的jar版本,修改为8.0.11版本mysqlmysql-connector-java8.0.11②修改数据库配置

mongodb - Meteor 项目部署和 mup 设置命令给出 "sshpass required for password based authentication"错误

我正在尝试部署一个基于Meteor的项目。我在服务器上使用nitrous.io,digitalocean,在MongoDB上使用compose.io。我已经想完成我的部署并运行“mup设置”命令并收到此消息:MeteorUp:ProductionQualityMeteorDeploymentssshpassrequiredforpasswordbasedauthentication尝试从此处http://git.io/_vHbvQ安装sshpass并运行命令“apt-getinstallsshpass”后,出现以下错误:E:Couldnotopenlockfile/var/lib/dp

在Firebase数据库中将数据从一个节点移动或复制数据

我正在尝试将存在的数据移动到一个节点,即CART_DETAILS/UID到另一个节点订单/UID/订单1。我尝试了不同的方法,但似乎都有些混乱。是否有内置功能或方法可以使工作更轻松?任何帮助都将受到赞赏。我已经附加了相同的图像。图片.看答案为了解决这个问题,我建议您使用以下代码行:publicvoidcopyRecord(FirebasefromPath,finalFirebasetoPath){fromPath.addListenerForSingleValueEvent(newValueEventListener(){@OverridepublicvoidonDataChange(Data

node.js - 使用 firebase 身份验证数据并从 firebase 用户向 mongodb 添加额外信息

我有一个带有使用firebaseauth的登录页面的React应用程序,我可以在其中使用facebook或google登录。这很好用,我可以显示用户名及其头像。我正在使用mongodb来保存其他项目,并且我有一个用户模型,我希望在其中保存一些额外的数据,例如国家/地区、年龄等。我能否以某种方式将firebaseauth用户数据与mongodb结合起来,所以当我创建一个新用户然后我可以使用mongodb创建一个新用户,但稍后添加额外的信息,如国家、年龄等吗?我想mongodb需要将一些ID与用户ID匹配吗?我尝试过的:我还没有尝试过上面的解决方案,因为我不确定它是否有效,或者我是否应该放

java - 无法使用带参数的构造函数 NO_CONSTRUCTOR 实例化 org.springframework.security.authentication.UsernamePasswordAuthenticationToken

我正在使用MongoDB编写自己的TokenStore(org.springframework.security.oauth2.provider.token.TokenStore)实现。为此,我使用了thecodeofIainPorter.我能够在mongo中保留token。我通过Autowiring我的自定义TokenStore的一个实例来做到这一点,然后我将它传递给端点。因此,我可以毫无问题地登录,但无法从资源服务器的mongo存储库中检索token。我的猜测是,将数据库中的对象转换/映射回Java对象时存在一些问题,该类是OAuth2AuthenticationReadConve

node.js - Node Passport 错误 : Unknown authentication strategy "local-login"

我一直在尝试在nodejs上使用Passport进行本地身份验证,据我所知,我的所有代码都是正确的,但我一直收到关于“未知身份验证策略”的同样烦人的错误,所以也许其他人可以帮助我对于这个问题,我的代码如下所示。这是我在nodejs中配置Passport的代码。varpassport=require('passport');varLocalStrategy=require('passport-local').Strategy;varUser=require('../models/user');module.exports=function(passport){passport.seria

MongoDB shell 历史不记得 'authentications'

当我在名为“authentications”的集合上使用命令时,MongoDB(MacOSXLion上的2.0.4)交互式shell的命令行历史记录不起作用,但它似乎适用于其他所有内容。$mongomydbMongoDBshellversion:2.0.4connectingto:mydb>db.aimsx.find().count()45>现在如果我点击向上箭头,我会得到这个:>db.aimsx.find().count()工作正常。但是,现在我对集合“身份验证”运行命令:>db.authentications.find().count()795>当我现在点击向上箭头时,我得到了这个

ChatGPT 串接 Firebase,實現上下文歷史紀錄

ChatGPT串接Firebase,實現上下文歷史紀錄在使用ChatGPTAPI時,因為API本身是「一次性」,無法儲存聊天的歷史紀錄,這也衍生了「無法串聯上下文」的問題,不過如果將ChatGPT串連Firebase的Realtimedatabase,就能夠做到在與ChatGPT聊天時,即時透過資料庫記錄上下文的內容,這篇教學會介紹相關的做法。快速導覽:建立與設定FirebaseRealtimedatabaseChatGPT使用text-davinci-003模型ChatGPT使用gpt-3.5-turbo模型建立與設定FirebaseRealtimedatabase 參考「建立Firebas

从firebase中删除项目

我是Firebase的新手,想知道如何制作,以便可以从用户数据库中删除项目,并且仅在用户插入特定代码之后,该项目才会删除,例如1234JSON订单示例{"address_id":"-Kn6eXyJ9XhglrVgA3eo","item_qty":1,"payment_id":"CREDIT","product_id":"item1","product_image":"chicken_maharaja","product_name":"NewChickenMaharaja","product_price":130,"status":"Queued","user_id":"D6yOQ1ZwWwYL