/** * Test authentication directly */ import { db } from './src/db/client' import { users } from './src/db/schema' import { randomUUID } from 'crypto' import bcrypt from 'bcryptjs' async function testAuth() { try { console.log('Testing auth...') // Hash password const passwordHash = await bcrypt.hash('test123', 10) console.log('Password hash:', passwordHash) // Insert user const userId = randomUUID() console.log('Inserting user with ID:', userId) await db.insert(users).values({ id: userId, email: 'test@test.com', username: 'testuser', passwordHash, }) console.log('User inserted successfully!') } catch (error) { console.error('Error:', error) } process.exit(0) } testAuth()