I've been struggling for hours trying to integrate passport with the existing bcrypt code in my project. I've read documentation, tried different things, and basically tortured myself for almost 15 hours. Can anyone take a look at my project and the snippets of code I'll share here? I really need help combining passport with my bcrypt code. Some code will need to be deleted and some added, which is normal, but please, any help will be greatly appreciated.
The code snippets will give you an idea of what things look like, but please take the time to look into my project on GitHub. Thank you so much! <3
https://github.com/tigerabrodi/blogcms
Auth Controller:
const path = require('path');
const bcrypt = require("bcryptjs");
const User = require("../models/user");
// More code snippets here...
User Model:
const mongoose = require("mongoose"),
Schema = mongoose.Schema,
bcrypt = require("bcryptjs");
// More code snippets here...
app.js:
require('dotenv').config({path: "node.env"});
const path = require('path');
const express = require('express');
// More code snippets here...