I am using node.js
for my application and I have to do user authentication via google. I have seen passport-google
module but I did not get any idea from that and there is no variable for username and password.
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
for OAuth Example 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
I think they are quite self explantory..
googleapis
模块支持OAuth 2.0, https://github.com/google/google-api-nodejs-client/blob/master/examples/oauth2.js上有一个示例
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.