jaredhanson / passport-google-oauth2

Google authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-google-oauth20/?utm_source=github&utm_medium=referral&utm_campaign=passport-google-oauth20&utm_content=about
MIT License
820 stars 153 forks source link

use without express #63

Closed fbeqirllari closed 4 years ago

fbeqirllari commented 4 years ago

how to use it without express? for example on a button click?

toritsejuFO commented 4 years ago

From the README:

This module lets you authenticate using Google in your Node.js applications. By plugging into Passport, Google authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

It basically supports any connect-style middleware, not just express.

As for the button click though, I don't really get that. All you have to do is add a button on your client side app (be it hosted on the same server or an SPA), and then make a request to the URL that kicks that the auth flow, once the button is click.

fbeqirllari commented 4 years ago

thanks!