Search code examples
node.jsmongodbexpresspassport.js

make user groups w/ passport


What's the easiest way to make user groups, using passport, mongoose, express & ejs? I want to make something like the Google Classroom app:

  • normal users being able to enter private groups
  • teachers being able to post information like homework
  • users being able to upload their lessons or homework

Solution

  • They are commonly called roles. Personally I followed this answer: Verifying roles & authentication with Passport.js.

    There are many tutorials but they heavily depend on your strategy. Search for passportjs roles and there must be a tutorial to satisfy your needs.