fix(admin-auth): reuse exact same QR/session API and component for admin login
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

- Removed invented adminAuthApiUrl endpoint and separate AdminLoginComponent.
  Admin login now uses the exact same Telegram session backend
  (TelegramSessionApiService, {authApiUrl}/users/sessions) and the exact
  same TelegramLoginComponent (mode="customer" | "admin" input) as customer
  login - only the storage (cookie/localStorage/signals) stays separate.
- Extracted the shared HTTP+normalization logic from AuthService into
  TelegramSessionApiService so both AuthService and AdminAuthService call it
  instead of duplicating request/parsing code.
- Documented the resulting backend gap in docs/Project-Editor.md: since the
  session API has no concept of "admin", server-side role enforcement is
  required when admin API calls are made - the frontend only decides where
  to store the session, not whether the user is actually an admin.
This commit is contained in:
sdarbinyan
2026-07-14 10:13:59 +04:00
parent 3877b70fdf
commit 6aec2ebcb2
17 changed files with 316 additions and 789 deletions

View File

@@ -15,8 +15,6 @@ export const environment = {
theme: 'dexar',
apiUrl: 'https://api.dexarmarket.ru:445',
authApiUrl: 'https://users.vitanova.network:456',
// Placeholder until backend delivers dedicated admin auth endpoints - keep path-scoped under authApiUrl so it's easy to repoint.
adminAuthApiUrl: 'https://users.vitanova.network:456/admin',
qrApiUrl: 'https://qr.vitanova.network/api',
logo: '/icons/icon-192x192.png',
contactEmail: 'info@dexarmarket.ru',

View File

@@ -16,8 +16,6 @@ export const environment = {
theme: 'dexar',
apiUrl: '/api',
authApiUrl: 'https://users.vitanova.network:456',
// Placeholder until backend delivers dedicated admin auth endpoints - keep path-scoped under authApiUrl so it's easy to repoint.
adminAuthApiUrl: 'https://users.vitanova.network:456/admin',
qrApiUrl: 'https://qr.vitanova.network/api',
logo: '/icons/icon-192x192.png',
contactEmail: 'info@dexarmarket.ru',