sahat / hackathon-starter

A boilerplate for Node.js web applications
MIT License
34.77k stars 8.14k forks source link

Update Passport authentication strategies #1293

Open Mano3009 opened 6 months ago

Mano3009 commented 6 months ago

Imports necessary modules like Passport, axios, and OAuth strategies (Facebook, Google, Twitter, etc.). Defines functions to handle user sessions (serializeUser, deserializeUser). Creates a common function (handleService) to manage user authentication for different social platforms. Configures Passport strategies for various platforms (Facebook, Google, etc.), each using handleService to authenticate users. Implements error handling for existing user accounts and email conflicts.

YasharF commented 6 months ago

Reopening; I need to look more into the options for the refactoring.