I am creating a fake web store to build up my portfolio and I am having issues with Passport js being able to authenticate two types of users, employees and users(customers). I have included the files in this Repl, https://repl.it/join/dfbwblsg-devcameronWhen I go to log in as an employee, I am not getting authenticated according to the `ensureEmployeeauthenticated` method in `employeeauth.js`. However, in `passport.js` in the `employee-local` strategy, I am finding the user in the DB (mongoDB) and the passwords are matching. Perhaps I am serializing the user wrong? Is this even the right way to accomplish having a system to manage two types of users?Please help, I was up till 3am last night working on this 😅Thanks in advance!
Submitted August 22, 2020 at 06:08PM by null-ref-err
No comments:
Post a Comment