Next.js Passport example havily insipired by andycmaj/nextjs-passport-session-auth with flow-middleware integration.
withIdentity
HOC resolves user
information on any PageComponents
(I extended @andycmaj's to make it work with any session middlewares)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