security: harden telegram-auth Edge Function

- Remove insecure from_miniapp auth method (telegram_id spoofing vulnerability)
- Implement HMAC-SHA256 signed session tokens (replace weak Base64 encoding)
- Reduce token expiry from 7 days to 24 hours
- Restrict CORS to production domains only (telegram.pezkuwichain.io, t.me)
- Add detailed debug logging for troubleshooting
This commit is contained in:
2026-02-06 04:06:49 +03:00
parent 1e21b1c40d
commit 7c02b8dd83
3 changed files with 136 additions and 87 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
{
"version": "1.0.113",
"buildTime": "2026-02-05T13:02:30.381Z",
"buildNumber": 1770296550382
"version": "1.0.116",
"buildTime": "2026-02-06T01:06:49.994Z",
"buildNumber": 1770340009995
}