docs: update admin user creation instructions

This commit is contained in:
2026-03-29 19:44:25 -07:00
parent cdbab52541
commit eb381d928c
2 changed files with 58 additions and 0 deletions
+29
View File
@@ -37,6 +37,35 @@ EuchreCamp is a Next.js 14+ application for managing Euchre tournaments and trac
## Common Tasks
### Admin User Creation
To create an admin user, use the provided scripts:
**Option 1: Using Better Auth API (Recommended)**
```bash
node scripts/create-admin-via-api.js
```
This creates the admin user `david@dhg.lol` with password `adminadmin` using Better Auth's internal API.
**Option 2: Direct Database Creation**
```bash
node scripts/create-admin-better-auth.js
```
This creates the admin user `david@dhg.lol` with password `admin` directly in the database.
**List All Users:**
```bash
node scripts/list-users.js
```
**Update Admin Password:**
```bash
node scripts/update-admin-password.js
```
This updates the admin password to `adminadmin`.
**Note:** All scripts currently create the user `david@dhg.lol`. If you need to create a different admin user, you can modify the email in the script or use Better Auth's CLI.
### Fixing Authentication Issues
If users are redirected incorrectly or permissions aren't working:
1. Check if cookie cache is disabled in `src/lib/auth.ts`