Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remcostoeten/nextjs-15-roll-your-own-authentication
Showcasing how to roll your own JWT auth without the use Lucia, nextauth, clerk or any other external service. Stored securely in PostgreSQL. Features like admin roles, onboarding and more,. All opt-in via config.
https://github.com/remcostoeten/nextjs-15-roll-your-own-authentication
admin authentication boilerplate jwt middleware nextjs15 react server-actions session solid starter
Last synced: about 1 month ago
JSON representation
Showcasing how to roll your own JWT auth without the use Lucia, nextauth, clerk or any other external service. Stored securely in PostgreSQL. Features like admin roles, onboarding and more,. All opt-in via config.
- Host: GitHub
- URL: https://github.com/remcostoeten/nextjs-15-roll-your-own-authentication
- Owner: remcostoeten
- Created: 2024-11-04T15:09:33.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T00:29:22.000Z (about 2 months ago)
- Last Synced: 2024-12-09T01:23:32.945Z (about 2 months ago)
- Topics: admin, authentication, boilerplate, jwt, middleware, nextjs15, react, server-actions, session, solid, starter
- Language: TypeScript
- Homepage: https://rollyourownauth.remcostoeten.com
- Size: 3.8 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.mdx
Awesome Lists containing this project
README
# Auth Your Own Roll
Still working on it, but life is busy.
## Overview
Auth Your Own Roll is a project designed to provide authentication solutions using various databases. This project utilizes Drizzle ORM for database interactions.
## Getting Started
### Prerequisites
- Node.js
- pnpm (or npm/yarn)
- A supported database (PostgreSQL, MySQL, SQLite, or Turso)### Installation
1. Clone the repository:
```bash
git clone
cd authyourownroll
```2. Install dependencies:
```bash
pnpm install
```### Configuration
Before running the project, you need to configure the database settings in the `drizzle.config.ts` file.
1. Open `drizzle.config.ts`.
2. Set the `dialect` property to your desired database type. The available options are:
- `'postgresql'`
- `'mysql'`
- `'sqlite'`
- `'turso'`Example configuration for PostgreSQL:
```typescript
export default {
dialect: 'postgresql',
// ... other configurations ...
}
```### Switching Databases
To switch the database:
1. Update the `dialect` property in `drizzle.config.ts` to the desired database type.
2. Ensure you have the corresponding database server running and accessible.
3. Install any necessary database drivers if required (e.g., `pg` for PostgreSQL, `mysql` for MySQL).### Running the Project
After configuring the database, you can run the project using:
```bash
pnpm gen
```