1
0
mirror of git://f0xx.org/ac/ac-ms-identity synced 2026-07-30 02:18:42 +03:00

18 Commits

Author SHA1 Message Date
Anton Afanasyeu
9b13cf2152 Use server-side branded QR data URIs for TOTP fallback images.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 14:21:10 +02:00
Anton Afanasyeu
49d547db70 bump deps: sync platform-php, platform-web, identity, scripts
Signed-off-by: Anton Afanasyeu <a.afanasieff@gmail.com>
2026-07-12 13:54:55 +02:00
Anton Afanasyeu
691c9322cb feat(identity): verify email TTL, resend API, mail TTL label
Signed-off-by: Anton Afanasyeu <a.afanasieff@gmail.com>
2026-07-12 13:53:15 +02:00
Anton Afanasyeu
40f969562f fix(2fa): expose qr scan URL with src=qr for phone camera links
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 21:40:01 +02:00
Anton Afanasyeu
3c4e79ecfa fix(2fa): QR approve uses request host and one-tap link token
Build approval URLs from the browser Host header (apps.f0xx.org not acl0); allow approve by QR token without a second TOTP on mobile.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 17:33:42 +02:00
Anton Afanasyeu
002e9cb710 fix(auth): 2FA redirect chain, QR approve via TOTP, 24h session
Honor post-login redirect through password and TOTP steps; approve cross-device sign-in with authenticator code when mobile has no session; reuse pending QR token; fix verify-email URL; purge stale pending registrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 14:48:27 +02:00
Anton Afanasyeu
48459cc392 fix(2fa): resolve approve URL from public_origin config
Use cfg('public_origin') instead of a hardcoded apps host so lab and prod
login QR links match the deployed BE origin.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 15:36:48 +02:00
Anton Afanasyeu
635cc36dd5 fix(2fa): use shortener QR PNG URL and otpauth fallback
AuthTwoFactorPage was setting img src to the short link URL (HTML), not
the /api/v1/qr/*.png endpoint. Always expose a PNG via qr_url.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 19:12:53 +02:00
Anton Afanasyeu
bb03237963 dep submodule update 2026-06-28 21:59:54 +02:00
Anton Afanasyeu
cefde609cb feat(2fa): cross-device approval via QR scan (WhatsApp-style)
- AuthApproval: mint/approve/consume/poll one-time tokens stored in new
  auth_approvals table (TTL 300s, SHA-256 IP hash for geo audit)
- AuthEmailSchema: add auth_approvals migration; fix missing index on
  auth_attempts (SQLite path)
- AuthTwoFactorPage: QR now encodes /two-factor/approve?token=<T> instead
  of the hub URL; stores raw_token in session for polling; short URL with
  ?src=qr tracking preserved
- Auth: add completeTotpLoginByApproval(), clearPending2fa clears token,
  clientIp() helper (X-Forwarded-For aware)
- bootstrap: require AuthApproval.php

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 22:49:39 +02:00
Anton Afanasyeu
835f02153e deps: register internal ac/* submodules under deps/ 2026-06-24 17:45:14 +02:00
Anton Afanasyeu
d50c426303 auth: embed verify-email QR as inline CID image (not remote URL)
Gmail blocks external QR img URLs; embed PNG via multipart/related while
keeping plain-text fallback URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 21:33:43 +02:00
Anton Afanasyeu
978831ecaa auth: Gmail relay deliverability — From match, Date, plain verify mail
Use SMTP username as From on smtp.gmail.com; add Date/Message-ID headers;
verify email plain text only (short link + QR URL line).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 20:14:27 +02:00
Anton Afanasyeu
035bed7512 auth: fix verify-email shorten guard; derive QR image URL from slug
Use is_callable for ShortLinksRepository; build qr image URL when pack
only has short_url (stale seed compatibility).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:08:41 +02:00
Anton Afanasyeu
290109d0f1 auth: embed hosted QR image in verify email instead of PNG attachment
Gmail blocks short-link + attachment as phishing; use multipart/alternative
HTML with s.f0xx.org/api/v1/qr PNG URL (QR still encodes …&src=qr).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:01:27 +02:00
Anton Afanasyeu
a64e5a7d48 auth: verify email with short link + QR PNG attachment
Multipart SMTP mail attaches verify-email-qr.png; QR encodes s.f0xx.org URL
with src=qr via ShortLinksRepository::shortenForOutboundMail.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:53:34 +02:00
Anton Afanasyeu
57efa146d9 auth: shorten verify-email URLs via url shortener before send
Outbound registration mail uses ShortLinksRepository::shortenForOutbound
(s.f0xx.org) with 24h TTL; falls back to long URL if shortener unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:37:23 +02:00
Anton Afanasyeu
9c70fcad5f initial 2026-06-23 12:29:30 +02:00