Repository navigation
Conversation
7d9dd0e to
92a2695
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The capability request can stall startup indefinitely, and sessionless Console access skips version loading and update notifications.
2 open findings
What changed in this PR
Adds Console authentication-disabled support while preserving cloud login behavior.
Changes:
- Reads the server authentication flag before initializing OAuth.
- Allows sessionless app access and hides login/logout controls when authentication is disabled.
- Updates component and service tests.
| File | Description |
|---|---|
| src/models/models.ts | Adds optional authentication capability flag. |
| src/main.ts | Loads capabilities before OAuth initialization. |
| src/app/login/login.component.ts | Guards login actions and redirects sessionless access. |
| src/app/login/login.component.spec.ts | Tests hidden login controls. |
| src/app/login/login.component.html | Conditionally hides login controls. |
| src/app/core/nav-footer/nav-footer.component.ts | Guards logout action. |
| src/app/core/nav-footer/nav-footer.component.spec.ts | Tests disabled logout behavior. |
| src/app/core/nav-footer/nav-footer.component.html | Hides account and logout controls. |
| src/app/auth.service.ts | Adds authentication-disabled access state. |
| src/app/auth.service.spec.ts | Tests protected-route access decisions. |
| src/app/app.component.ts | Drives shell visibility from app access. |
| src/app/app.component.spec.ts | Updates shell access tests. |
| src/app/app.component.html | Shows navigation for permitted access. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
92a2695 to
89b8cbd
Compare
Tested these scenarios:
|
89b8cbd to
f5c1577
Compare
Adopts the protected-route access and version-loading approach from #3643.
|
Thanks for this. I'm closing it in favor of #3577, which avoids the startup request by having Console set the flag in the bundle, but I'm adopting your approach of keeping "logged in" separate from "allowed in" through |
* feat(login): skip login when Console runs with auth disabled Adds an authDisabled environment flag (minified as authDisabled:!1) that Console flips when AUTH_DISABLED=true. The UI then starts logged in, redirects /login to the dashboard, and hides the logout menu. * feat(login): open routes without faking a session when auth is off Adopts the protected-route access and version-loading approach from #3643.


PR Checklist
What are you changing?
Anything the reviewer should know when reviewing this PR?
If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )
device-management-toolkit/console#1322