How to authenticate google user using node.js

I am using node.js

for my application and I have to authenticate the user via google. I saw the module passport-google

but I got no idea from it and there is no variable for username and password.

One thing is my app is a desktop app.

+3


source to share


2 answers


You can either do it through OAuth or OpenID for both, there are very detailed examples on the .js passport that you still need

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



for example OpenID (deprecated) https://github.com/jaredhanson/passport-google/blob/master/examples/signon/app.js

I think they are quite self-investigating.

+6


source


googleapis

the module supports OAuth 2.0, there is an example at https://github.com/google/google-api-nodejs-client/blob/master/examples/oauth2.js



+2


source







All Articles