https://github.com/userfront/next-js-sample-app
Sample app for userfront using nextjs
https://github.com/userfront/next-js-sample-app
Last synced: 4 months ago
JSON representation
Sample app for userfront using nextjs
- Host: GitHub
- URL: https://github.com/userfront/next-js-sample-app
- Owner: userfront
- Created: 2024-08-12T05:07:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T22:34:28.000Z (about 1 year ago)
- Last Synced: 2025-04-13T16:14:21.036Z (about 1 year ago)
- Language: TypeScript
- Size: 169 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Userfront Next 14 Example
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) and using [`@userfront/next`](https://www.npmjs.com/package/@userfront/next) for auth. The app is ready to be deployed to Vercel.
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fuserfront%2Fnext-js-sample-app&project-name=nextproject&integration-ids=oac_cNber98Way2tpblRNJAWff6O)
---
**Curious about how to use the Next SDK on your existing application?**
[Read the quickstart instructions on Userfront.](https://userfront.com/docs/quickstart?v=next)
[Read the guide on Userfront.](https://userfront.com/docs/examples/next)
## Requirements
- Node.js v18 or later
## Prerequisites
1. Have or create a Userfront account at https://userfront.com/
1. Install dependencies
> npm install
1. Copy `.env.example` into a file called `.env.local`
> cp .env.example .env.local
1. Have the following set as environment variables in `.env.local`:
1. USERFRONT_JWT_PUBLIC_KEY (Can be found at https://userfront.com/dashboard/jwt?tab=public )
1. NEXT_PUBLIC_USERFRONT_WORKSPACE_ID (Can be found at https://userfront.com/dashboard )
## Running the app
1. Run the development server
> npm run dev
1. Visit http://localhost:3000
## Troubleshooting
Need some help? We're always here and happy to help. Please do not hesitate to [contact support](https://userfront.com/contact).