简体   繁体   English

如何使用node.js对Google用户进行身份验证

[英]How to authenticate google user using node.js

I am using node.js for my application and I have to do user authentication via google. 我使用node.js作为我的应用程序,我必须通过谷歌进行用户身份验证。 I have seen passport-google module but I did not get any idea from that and there is no variable for username and password. 我已经看过passport-google模块,但我没有从中得到任何想法,并且没有用户名和密码的变量。

One thing is that My application is desktop application . 有一点是我的应用程序是桌面应用程序。

You can either do it through OAuth or OpenID for both cases there are very detail examples on passport.js what else you need 你可以通过OAuth或OpenID来做这两种情况,在passport.js上有非常详细的例子你需要什么

for OAuth Example https://github.com/jaredhanson/passport-google-oauth/blob/master/examples/oauth2/app.js for OAuth示例https://github.com/jaredhanson/passport-google-oauth/blob/master/examples/oauth2/app.js

for OpenID Example (deprecated) https://github.com/jaredhanson/passport-google/blob/master/examples/signon/app.js for OpenID Example(不建议使用) https://github.com/jaredhanson/passport-google/blob/master/examples/signon/app.js

I think they are quite self explantory.. 我认为他们是非常自我解释的..

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

相关问题 如何使用Node.js在远程服务器上使用对Google Sheets API进行身份验证的用户? - How to use authenticate a user for google sheets api on a remote server using Node.js? 如何使用Socketio-jwt node.js对用户进行身份验证 - How to Authenticate user using Socketio-jwt node.js 无法使用 Node.js 验证谷歌服务帐户 - Can't authenticate google service account using Node.js 如何使用 node.js 在 heroku 上验证 google-vision api 凭据? - How to authenticate google-vision api credentials on heroku using node.js? 如何使用Node.js和simple-oauth2对LinkedIn进行身份验证 - How to authenticate LinkedIn using Node.js and simple-oauth2 使用Node.js验证DDP客户端 - Authenticate DDP Client using Node.js 无法使用node.js向MongoDB进行身份验证 - Failing to authenticate with MongoDB using node.js 如何使用Node.js中的htpasswd对请求进行身份验证 - How to authenticate a request with htpasswd in Node.js 使用Google身份验证的node.js中的持久用户会话 - Persistent user sessions in node.js using Google Authentication Google Sheets API v4,如何从Node.js(Docker容器)进行身份验证 - Google Sheets API v4, How to authenticate from Node.js (Docker Container)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM