Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to authenticate google user using node.js

Tags:

node.js

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 .

like image 314
Jayant Patil Avatar asked Feb 18 '23 18:02

Jayant Patil


1 Answers

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..

like image 189
khurrum qureshi Avatar answered Feb 27 '23 00:02

khurrum qureshi