Feature: Add password change functionality for admin and customers
- Add customer password change page at /account/change-password - Add admin password change page at /admin/change-password - Create AdminUser database table for storing admin credentials - Admin login now checks database first, falls back to env vars - Update admin auth to support bcrypt password hashing - Add change password links to customer account and admin nav - Fix customer login logs back link (was pointing to non-existent /admin) - Add success/error message handling for password changes Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
36cc6dddff
commit
9623ac2fdb
@@ -0,0 +1,13 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "AdminUser" (
|
||||
"id" TEXT NOT NULL,
|
||||
"username" TEXT NOT NULL,
|
||||
"passwordHash" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "AdminUser_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "AdminUser_username_key" ON "AdminUser"("username");
|
||||
Reference in New Issue
Block a user