nestjs-restful-best-practice icon indicating copy to clipboard operation
nestjs-restful-best-practice copied to clipboard

authservice Google/Facebook

Open Upsetmania opened this issue 4 years ago • 2 comments

hello, can you show me how oauth google and facebook work? because the code is missing thank you very much

Upsetmania avatar Jun 23 '20 14:06 Upsetmania

hi, a little help would be really great ;)

Upsetmania avatar Jun 25 '20 17:06 Upsetmania

Here are the three steps you need to follow to resolve your issue:

  1. Implement Google auth using @nestjs/passport and passport-google-auth (other providers are very similar).
  2. Once redirected back to the app, issue a JWT token, so the app can manage the user’s session.
  3. Protect REST and GraphQL endpoints with a JWT strategy.

Here is a link that might help you : https://javascript.plainenglish.io/oauth2-in-nestjs-for-social-login-google-facebook-twitter-etc-8b405d570fd2

doriandevtech avatar May 03 '22 20:05 doriandevtech