fix(auth): redirect already-signed-in users away from the login page
CI/CD / CI · API (dotnet build + test) (push) Successful in 40s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 30s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m10s
CI/CD / CI · Admin Web (tsc) (push) Successful in 38s
CI/CD / CI · Website (tsc) (push) Successful in 47s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Successful in 2m57s

Visiting /login while authenticated now redirects to the app (/pos) instead of
showing the login form again. Guarded on _hasHydrated so the not-yet-rehydrated
(null) session isn't misread, and renders a brief "redirecting" state instead of
flashing the form. fa/en/ar strings added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-21 10:39:27 +03:30
parent d261c13175
commit fd1f985597
4 changed files with 21 additions and 1 deletions
+1
View File
@@ -39,6 +39,7 @@
"auth": {
"title": "تسجيل الدخول إلى ميزي",
"subtitle": "سيتم إرسال رمز التحقق إلى هاتفك",
"redirecting": "مسجّل الدخول بالفعل — يتم التحويل…",
"phone": "رقم الجوال",
"phonePlaceholder": "٠٩١٢١٢٣٤٥٦٧",
"sendOtp": "إرسال الرمز",
+1
View File
@@ -39,6 +39,7 @@
"auth": {
"title": "Sign in to Meezi",
"subtitle": "We will send a verification code to your phone",
"redirecting": "Already signed in — redirecting…",
"phone": "Mobile number",
"phonePlaceholder": "09121234567",
"sendOtp": "Send code",
+1
View File
@@ -39,6 +39,7 @@
"auth": {
"title": "ورود به میزی",
"subtitle": "کد تأیید به موبایل شما ارسال می‌شود",
"redirecting": "قبلاً وارد شده‌اید — در حال انتقال…",
"phone": "شماره موبایل",
"phonePlaceholder": "۰۹۱۲۱۲۳۴۵۶۷",
"sendOtp": "ارسال کد",