DEV Community

Discussion on: Stand Up a Node.js Server with NestJS including TypeScript and GraphQL

Collapse
 
aryanjnyc profile image
Aryan J

Hey Hein:

You're right. The docs don't have recipes for many things (as you said, social providers auth with sessions). They do feature an authentication section that describes using passport.js to create an AuthenticationModule. Have you taken a look at that?

I'm looking for new material to write. Do you think a blog post / set of videos that cover social provider authentication would help?

Thread Thread
 
heindauven profile image
Hein Dauven • Edited

Hey Aryan, yes I've followed the docs but didn't find it too helpful for the issues I faced. (backend & frontend on different ports, causing same site cookies to not be attached, lack of API docs for some strategies. Not knowing which parameters are available and what they do. )

A lot can be written about social providers and authentication, like:

  • sessions VS jwt, when one is preferred over the other.
  • Sessions and JWT in the same app. (sessions for users, jwt for API requests server to server)
  • Retrieving specific data from social providers
  • Implementing social providers the nestjs way.

Many of the examples I found online for Nestjs + social providers contained way too much code and didn't feel like a solid Nestjs way of doing things. A curated approach would be very welcome, be it in article and/or video form.