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 [email protected]:Authress/nextjs-starter-kit.git
cd nextjs-starter-kit
- Run
npm install
and thennpm run dev
. (Or use yarn/pnpm to install dependencies and thenstart
the site.) - Open http://localhost:3000 with your browser to see the result.
src/app
page.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.tsx
file