Skip to content

An example project that uses Nextjs and Next Auth to handle authentication

License

Notifications You must be signed in to change notification settings

aspen-cloud/triplit-next-auth-example

Repository files navigation

Triplit · Next · Next Auth

This is an example Triplit project that uses Next.js and Next Auth

Getting Started

Create your project

Create a new project in your Triplit Dashboard

Setup your environmental variables

Create a file named .env.local and copy the variables from env.example, filling in each with info from your project details found in the dashboard.

Ensure the "External JWT Secret" in the Triplit Dashboard matches what you set as NEXTAUTH_SECRET in your .env file.

Run the schema migrations

yarn triplit migrate up --token=<secret-token-key>

Start the Nextjs dev server

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Viewing your data in the Console

  1. Navigate to your Triplit Console
  2. Paste in your project's Secret Key from the Dashboard
  3. Explore your data!

Need help?

Join our Discord where our team and community can help you out!

About

An example project that uses Nextjs and Next Auth to handle authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published