Error: Unknown authentication strategy "local" & Not found page when try to login using Github

Tell us what’s happening:

My code was able to pass the tests and move on to the next lesson so far, but I couldn’t log in using Github and there was an error message when I tried to log in right after registration on my app.

[ After registration ] → There is just a regular page

[ After login]

Error: Unknown authentication strategy "local"
    at attempt (/home/runner/boilerplate-advancednode/node_modules/passport/lib/middleware/authenticate.js:190:39)
    at authenticate (/home/runner/boilerplate-advancednode/node_modules/passport/lib/middleware/authenticate.js:367:7)
    at Layer.handle [as handle_request] (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/layer.js:95:5)
    at /home/runner/boilerplate-advancednode/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/index.js:335:12)
    at next (/home/runner/boilerplate-advancednode/node_modules/express/lib/router/index.js:275:10)
    at SessionStrategy.strategy.pass (/home/runner/boilerplate-advancednode/node_modules/passport/lib/middleware/authenticate.js:343:9)

[ After clicking Social Login - Login with Github! ] → Not Found page shows up.

Your project link(s)

solution: https://replit.com/@boyeongyoon/boilerplate-advancednode

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36

Challenge: Announce New Users

Link to the challenge:

You should set passport to use both strategies - Local and Github

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.