Authentication for Next.js
It comes with example configuration for Facebook, Google+, Twitter and email sign in and uses Mongo DB to store accounts, but it is easy to extend to work with other providers and other databases.
It has a client for React called NextAuthClient which is an isomorphic (client and server side) library that populates session state in pages.
The NextAuth library uses Express and Passport to provide support for signing in with email and with services like Facebook, Google and Twitter.
It adds session support without using client side accessible session tokens, providing protection against Cross Site Scripting (XSS) and session hijacking, while leveraging localStorage where available to cache non-critical session state for optimal performance in Single Page Apps.
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.
In future, I’d like to simplify the interface further so it can be configured just by setting ID & SECRET values for each oAuth provider and a database URI, while still allowing for more advanced custom configuration.
If you haven’t seen Next.js yet and are at all intersted in React I you should really check it out.
It’s a really wonderful and unopinioned way to sites with React without having to configure bable, webpack, routing or server side rendering.