- User registration/login with bcrypt password hashing - SQLite database with goose migrations and sqlc-generated queries - Games and players persisted to database, resumable after restart - Guest play still supported alongside authenticated users - Auth UI components (login/register forms, auth header, guest banner)
11 lines
237 B
SQL
11 lines
237 B
SQL
-- name: CreateUser :one
|
|
INSERT INTO users (id, username, password_hash)
|
|
VALUES (?, ?, ?)
|
|
RETURNING *;
|
|
|
|
-- name: GetUserByID :one
|
|
SELECT * FROM users WHERE id = ?;
|
|
|
|
-- name: GetUserByUsername :one
|
|
SELECT * FROM users WHERE username = ?;
|