Add SEO sitemap/robots + real SMS OTP (Kavenegar, admin-configured)
CI/CD / CI · dotnet build (push) Successful in 31s
CI/CD / Deploy · hamkadr (push) Successful in 56s

- /sitemap.xml (static pages + open shifts + fresh jobs, respecting expiry) + /robots.txt (blocks /Admin,/Employer); base URL from forwarded request → https://hamkadr.ir in prod
- ISmsSender + KavenegarSmsSender (verify/lookup template, sms/send fallback); SMS settings (enabled/apikey/template/sender) in /Admin/Settings; OtpService.IssueAsync sends SMS and stops revealing the code when enabled (dev still shows it); migration

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 10:27:21 +03:30
parent 6d2ad6f87e
commit 17d38431bf
12 changed files with 1152 additions and 11 deletions
@@ -44,9 +44,13 @@
{
<div class="alert alert-success">
کد تأیید (حالت توسعه): <strong dir="ltr">@Model.DevCode</strong><br />
<span style="font-size:12px;">در نسخه‌ی نهایی این کد از طریق پیامک (کاوه‌نگار/SMS.ir) ارسال می‌شود.</span>
<span style="font-size:12px;">در حالت عادی این کد با پیامک ارسال می‌شود.</span>
</div>
}
else
{
<div class="alert alert-success">کد تأیید با پیامک به شماره شما ارسال شد.</div>
}
<form method="post">
<input type="hidden" name="Phone" value="@Model.Phone" />
<input type="hidden" name="AccountType" value="@Model.AccountType" />
@@ -36,7 +36,7 @@ public class LoginModel : PageModel
public void OnGet() { }
public IActionResult OnPostRequestCode()
public async Task<IActionResult> OnPostRequestCodeAsync()
{
var phone = OtpService.Normalize(Phone);
if (phone.Length < 10)
@@ -45,7 +45,7 @@ public class LoginModel : PageModel
return Page();
}
Phone = phone;
DevCode = _otp.Issue(phone); // dev: surface the code; prod: SMS gateway sends it
DevCode = await _otp.IssueAsync(phone); // null when SMS is enabled (sent via gateway)
CodeSent = true;
return Page();
}