Brian Mahecha (2) [Avatar] Offline
Hello there,

Loving the text thus far. I'm starting a new position next week and have to be somewhat versed in Express.
In Chapter 8.15 there is code to implement passport but I keep getting an error was passport relating to "strategy ". Most online searches tell me I have to instantiate a new LocalStrategy.
I think I can figure it out but I feel like this code may have been left out by accident. Any help in this would be greatly appreciated. Thank you for your time.

Brian Mahecha
Brian Mahecha (2) [Avatar] Offline
So this application came full circle for me when I looked at the sample code from github and read the rest of the chapter. The whole thing felt a little disjointed unfortunately. For example part 8.15 introduced the passport authenticate method of "login" before it was ever defined in the LocalStrategy instantiation. Going to have to revisit that code to try and understand it all better. Thank you!
Adel (2) [Avatar] Offline
Got the same error too.

Error: Unknown authentication strategy "login"
Evan Hahn (70) [Avatar] Offline
Unfortunately, there have been a number of mistakes in the ordering of Chapter 8. The code on GitHub should work a little better than what's in the book, and I'll make sure to correct this if I release another edition.

Sorry for the confusion!