feat(admin-auth): add dev-only QR bypass via ?devBypassAdmin=true
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

Fabricates a local admin session and activates it directly, skipping the
Telegram QR flow, for local testing without a reachable session backend.
Guarded by environment.production at runtime - no-ops in production
builds even if this code ships.
This commit is contained in:
sdarbinyan
2026-07-15 00:58:21 +04:00
parent 677dfb73e8
commit 2b52965f2f
2 changed files with 33 additions and 1 deletions

View File

@@ -85,7 +85,13 @@ export class App implements OnInit {
this.checkServerHealth();
}
/** ?login=true / ?adminLogin=true open the respective login dialog for manual testing. No effect when absent. */
/**
* ?login=true / ?adminLogin=true open the respective login dialog for
* manual testing. ?devBypassAdmin=true skips the QR flow entirely and
* activates a fake local admin session - dev builds only, no effect (and
* no-ops server-side too, see AdminAuthService.devBypassLogin) in
* production. No effect when the params are absent.
*/
private openLoginDialogsFromTestModeQueryParams(): void {
if (typeof window === 'undefined') {
return;
@@ -97,6 +103,9 @@ export class App implements OnInit {
if (params.get('adminLogin') === 'true') {
this.adminAuthService.requestLogin();
}
if (params.get('devBypassAdmin') === 'true') {
this.adminAuthService.devBypassLogin();
}
}
private setupAutoUpdates(): void {