简体   繁体   English

如何知道用户是否在 Nodejs 上使用 Firebase 通过 Google auth 进行了身份验证?

[英]How to know if user is authenticated with Google auth using Firebase on Nodejs?

I've used Google auth using Firebase on Android app before.我之前在 Android 应用程序上使用 Firebase 使用 Google auth。 But this time I want my backend server to know if user is authenticated or not.但是这次我希望我的后端服务器知道用户是否经过身份验证。 User will authenticate using Firebase auth from Flutter app.用户将使用 Flutter 应用程序中的 Firebase auth 进行身份验证。 Right now I've done simple email and password auth.现在我已经完成了简单的 email 和密码验证。 Flutter will send username and password to the server and server is authenticating using Firebase. Flutter 将用户名和密码发送到服务器,服务器正在使用 Firebase 进行身份验证。 But I don't know how to do in case with Google or Facebook auth.但我不知道如何使用 Google 或 Facebook 身份验证。

Using Google or Facebook login the first thing is to login via plugging that does the authentification for you and will give you back some information about the login.使用 Google 或 Facebook 登录,第一件事是通过插件登录,该插件会为您进行身份验证,并将返回一些有关登录的信息。 Next step is to send the token to your server and the server will need to check with Google or Facebook if it's valid (With these verification we can verify that the user has done the sign in with the third party correctly).下一步是将令牌发送到您的服务器,服务器将需要与 Google 或 Facebook 核对是否有效(通过这些验证,我们可以验证用户是否已正确登录第三方)。

I have used for Flutter the next dependency:我已经为 Flutter 使用了下一个依赖项:

For NodeJs verification in the Back-end:对于后端的 NodeJs 验证:

You need to follow the steps in the documentation to install the dependencies and you will need firebase.您需要按照文档中的步骤安装依赖项,并且需要 firebase。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何验证最终用户身份验证令牌(使用 Firebase 身份验证)以调用谷歌云运行端点? - How to verify end user authenticated token (Firebase auth used) to invoke google cloud run endpoint? 如何知道使用我的Google帐户进行身份验证的用户的身份验证电子邮件 - How to know authenticated email of an user who authenticated with his google account for my app 使用 firebase auth 认证谷歌云大查询库 - NodeJS - Using firebase auth to authenticate google cloud bigquery library - NodeJS 使用 auth 知道用户已登录 - Using auth to know that a user is logged in 使用 firebase Nodejs 客户端时如何处理 Auth 变量机制 - How to handle Auth variable mechanism while using firebase Nodejs client 如何授权用户使用下一个身份验证与 nodejs 服务器? - How to authorize user using next auth with nodejs server? 如何使用 nodejs 在云 Firestore 中检索用户身份验证信息? - How to retrieve user auth information in cloud firestore using nodejs? 如何验证用户是否已通过身份验证并存在于 firebase 中,在 nodejs 中对 rest-api 进行读/写操作时,UI 位于 flutter 中? - How to verify a user is authenticated and present in firebase, when doing read/write operations on the rest-api, in nodejs, UI is in flutter? 我如何使用 firebase auth 在 nodejs 的服务器端验证用户电话号码 - How can i authenticate user phone number on server side in nodejs with firebase auth Firebase Auth SignOut() - nodejs - Firebase Auth SignOut() - nodejs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM