Authentication for Next.js

Update June 2020

The next generation version NextAuth.js was released in June 2020!

Original Article

This week I released NextAuth, a module specifically designed for Next.js and React, that supports email sign in and oAuth.
Populating session state in a React with NextAuth


The NextAuth library uses Express and Passport to provide support for signing in with email and with services like Facebook, Google and Twitter.


NextAuth includes its own minimal example project but the NextJS Starter Project provides a more complete example.


While the documentation is comprehensive and there are multiple examples of how to use it, it’s still far more cumbersome to add authentication to sites that it needs to be.


If you haven’t seen Next.js yet and you use React you should check it out.

Software for news and media and civic tech. Cat herder. Director at Glitch Digital.