This repository is a repo template that contains a Nex.js example that uses Authress to Login. You can either Fork this repository to start with the template, or directly clone it above.
- Fork this template repository to start a new Next.js project: Fork this template
- Clone the new repository:
git clone git@github.com:Authress/nextjs-starter-kit.git
cd nextjs-starter-kit- Run
npm installand thennpm run dev. (Or use yarn/pnpm to install dependencies and thenstartthe site.) - Open http://localhost:3000 with your browser to see the result.
src/apppage.tsx- Landing page which has login and logout buttonsauthressClient.tsx- Configuration for Authress for users to loginprotected/page.tsx- Page protected by user login via the login guard defined in themain.tsxfile
