Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Async/Await example for passport.js and express.js (wlaurance.com)
2 points by wlaurance on Sept 4, 2018 | hide | past | favorite | 1 comment


I've been deep in the weeds building out a course. Today I wanted to share a snippet of building out an express + passport auth scheme using the latest async/await patterns. It's really nice to not be in callback hell. Even though passport mostly uses callbacks we can still do our app-specific code like looking up a user by email, de-serialization, and serialization in an async function if desired.

I have an email signup if you want to get the full working code same.

Thanks!

Will




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: