forgot password in login page and account info implemented, sms.ir service works fine with sandbox key.

This commit is contained in:
2026-07-04 00:01:58 +03:30
parent 2f95559087
commit 3f7364dbf0
26 changed files with 1000 additions and 38 deletions

View File

@@ -0,0 +1,25 @@
-- AlterTable
ALTER TABLE "users" ADD COLUMN "mobile" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "users_mobile_key" ON "users"("mobile");
-- CreateTable
CREATE TABLE "phone_verification_codes" (
"id" TEXT NOT NULL,
"userId" TEXT,
"mobile" TEXT NOT NULL,
"codeHash" TEXT NOT NULL,
"purpose" TEXT NOT NULL,
"expiresAt" TIMESTAMP(3) NOT NULL,
"verifiedAt" TIMESTAMP(3),
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "phone_verification_codes_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "phone_verification_codes_mobile_purpose_createdAt_idx" ON "phone_verification_codes"("mobile", "purpose", "createdAt");
-- AddForeignKey
ALTER TABLE "phone_verification_codes" ADD CONSTRAINT "phone_verification_codes_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;