Awesome
Next.js Passport OAuth Example
Next.js Passport example havily insipired by andycmaj/nextjs-passport-session-auth with flow-middleware integration.
Features
- flow-middleware lets you use any Express middlewares
withIdentity
HOC resolvesuser
information on anyPageComponents
(I extended @andycmaj's to make it work with any session middlewares)- Ready to use appConfig.ts, thanks to @andycmaj
How to use
Set required environment variables. Use .env.template
if you use a dotenv tool.
export GITHUB_CLIENTID=<your github app's client id>
export GITHUB_CLIENTSECRET=<your github app's client secret>
Install it and run:
yarn
yarn dev