auth: gate ed25519 exports, resolve CORS changeset, add backend TODO

This commit is contained in:
2026-08-24 00:00:29 +04:00
parent f6a58a9a3e
commit 8a954916e1
5 changed files with 43 additions and 27 deletions

View File

@@ -3,6 +3,14 @@
// docs/context/adrs/ADR-0001-extract-auth-and-payment-into-shared-marketplaces-packages.md):
// - telegram/ — live Telegram QR/session auth (customer + admin)
// - ed25519/ — future Ed25519 challenge/response admin auth (backend not shipped yet)
//
// ed25519/ is intentionally NOT exported below (2026-08-23) — its backend has
// never shipped, so it was dead weight in every consumer's bundle. Source
// stays in src/ed25519/ untouched; re-add the export block (removed here,
// see git history / .changeset/gate-ed25519-exports.md) once that backend
// is real. Breaking change for any consumer importing ed25519 symbols —
// none confirmed to exist at the time of this change.
//
// Provide AUTH_API_URL (and optionally TELEGRAM_BOT_USERNAME) from the consuming app's config.
export { AUTH_API_URL, TELEGRAM_BOT_USERNAME, MARKETPLACES_AUTH_CONFIG, provideMarketplacesAuth } from './config';
@@ -20,30 +28,3 @@ export { AuthService } from './telegram/auth.service';
export { AdminAuthService } from './telegram/admin-auth.service';
export { adminAuthGuard } from './telegram/admin-auth.guard';
export { adminAuthHeadersInterceptor } from './telegram/admin-auth-headers.interceptor';
// Ed25519 module (namespaced re-exports to avoid colliding with the telegram module's AuthService)
export { AuthService as Ed25519AuthService } from './ed25519/auth.service';
export { AuthFacade } from './ed25519/auth-facade.service';
export { AuthApiService } from './ed25519/auth-api.service';
export { SessionService } from './ed25519/session.service';
export { JwtService } from './ed25519/jwt.service';
export { Ed25519KeypairService } from './ed25519/ed25519-keypair.service';
export { PermissionService } from './ed25519/permission.service';
export {
Ed25519VerificationService,
Ed25519Challenge,
Ed25519SignedResponse,
Ed25519VerificationResult
} from './ed25519/ed25519-verification.model';
export { NoopEd25519VerificationService } from './ed25519/noop-ed25519-verification.service';
export {
AuthChallenge,
VerifySignatureRequest,
AuthTokenPair,
RefreshTokenRequest,
JwtClaims
} from './ed25519/models/auth-api.model';
export { AuthErrorCode, AuthError, authErrorCodeFromBackendCode, authErrorCodeFromStatus } from './ed25519/models/auth-error.model';
export { AdminRole, Permission, ROLE_PERMISSIONS } from './ed25519/models/permission.model';
export type { LoginPhase } from './ed25519/auth.service';
export type { SessionStatus } from './ed25519/session.service';