passport-discord
passport-discord copied to clipboard
Error: Unknown authentication strategy "discord"
Error: Unknown authentication strategy "discord" at attempt (C:\Users\#####\djs-bot\backend\node_modules\passport\lib\middleware\authenticate.js:190:39) at authenticate (C:\Users#####\djs-bot\backend\node_modules\passport\lib\middleware\authenticate.js:367:7) at Layer.handle [as handle_request] (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\layer.js:95:5) at next (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\layer.js:95:5) at C:\Users#####\djs-bot\backend\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\index.js:335:12) at next (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\index.js:275:10) at Function.handle (C:\Users#####\djs-bot\backend\node_modules\express\lib\router\index.js:174:3)
Can you provide your implementation code?
We cannot help you unless you provide your code.
hey i have the same problem.
i am following this guys tutorial: https://www.youtube.com/watch?v=DomtnrQ4f3Q (this is get a understanding of what the layout is)
here is the code for my auth.js file
const router = require('express').Router();
const passport = require('passport')
router.get('/discord', passport.authenticate('discord'));
router.get('/discord/callback', passport.authenticate('discord', {
failureRedirect: '/'
}), function(req, res) {
res.redirect('/secretstuff') // Successful auth
});
module.exports = router;
Nvm i figure out that i didn't have the passport strat
I have the same issue..
Here is the strategy: https://pastebin.com/MwtYCc3A
hey @M4iky1 do you have your strat in the route for my problem i didnt have the start getting called anywhere
https://codepen.io/cringekidy/project/editor/AwpbjL have a look here to see what i am talking about
thanks!