Source code for the Next.js crash course project that uses Auth0, Tailwind CSS, SWR, React Hook Form, and FaunaDB!
Want to follow along yourself?
In part one, we setup a database in Fauna and create a new Nextjs application from scratch. We add CRUD functionality for working with code snippets while using some cool technologies like Tailwind CSS, react-hook-form, and SWR.
In part 2, we will add authentication to the snippets app using Auth0. We'll learn how to create protected pages and routes in Next.js, how to associate snippets with users, and add authorization to make sure only appropriate users can update and delete snippets.
Video tutorial coming soon!
Create a collection in Fauna called snippets
and a token (more info on tokens)[https://docs.fauna.com/fauna/current/security/tokens.html].
Create an application in Auth0 and make note of your domain, client Id, and client secret. Chekout the dos for more details on setup + configuration.
Copy the .env.local.example
file to .env.local
and include your credentials.
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.