Answers for "passport how to replace missing credential"

0

passport how to replace missing credential

const express = require('express')
const router = express.Router()
const passport = require('passport')
const { index } = require('../controllers/login.controller').loginController

router.get('/login', index)
router.post(
  '/login',
  passport.authenticate('local', {
    badRequestMessage: '<div class="alert alert-danger">User account is not exist</div>',
    failureFlash: true,
    successFlash: true,
    failureRedirect: '/user/login',
    successRedirect: '/'
  })
)

module.exports = router
Posted by: Guest on July-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language