Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bethel-nz/auth-v5
a template for setting up auth.js v5 and next.js
https://github.com/bethel-nz/auth-v5
Last synced: about 1 month ago
JSON representation
a template for setting up auth.js v5 and next.js
- Host: GitHub
- URL: https://github.com/bethel-nz/auth-v5
- Owner: Bethel-nz
- Created: 2024-04-01T22:28:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T14:35:42.000Z (4 months ago)
- Last Synced: 2024-09-13T02:56:22.654Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 171 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
- This is a [`Next.js`](https://nextjs.org/) template bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) and [`Auth.js`](https://authjs.dev)
## Usage
```bash
bunx create-next-app --example https://github.com/Bethel-nz/auth-v5 my-example-app
#or
yarn create-next-app --example https://github.com/Bethel-nz/auth-v5 my-example-app
#or
npx create-next-app@latest --example https://github.com/Bethel-nz/auth-v5 my-example-app
#or
pnpm create-next-app --example https://github.com/Bethel-nz/auth-v5 my-example-app
```
## Getting Started
- By default this template uses prisma adapter
- remember to set your `DATABASE_URL` in the env file
- make a `.env` file or `.env.local` file
- add your necessary client keys and id or your providers accessing keys and values
- prefix them with `Auth_` and then the id```
AUTH_EXAMPLE_PROVIDER_ID = value goes here
AUTH_EXAMPLE_PROVIDER_SECRET = value goes here
```- check if auth.js supports your provider - [Auth.js providers](https://authjs.dev/getting-started/providers)
- add your provider to the `auth.config.ts` file in config dir
- next auth v5 will pick up provider secret and id
- don't forget to generate your secret and add it to the `.env` files
- cross reference the `.env.example` file - [here](./.env.example)
## Run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## Learn More
To learn more about this template, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Auth.js Documentation](https://authjs.dev/)You can check out [the Auth-v5 GitHub repository](https://github.com/Bethel-nz/auth-v5) - your feedback and contributions are welcome!
## Stack
~ This project uses:
- [Next.js](https://nextjs.org/docs)
- [Auth.js](https://authjs.dev)
- [Prisma](https://prisma.io/docs/getting-started)
- [Shadcn-ui](https://ui.shadcn.com)