Architecture: How to fix auth/sign-in in gograb-ai app for browser users?
Documentation for Sessions
ποΈ Architecture: How to fix auth/sign-in in gograb-ai app for browser users?
Date: 2026-03-02
Time: 15:55:15 UTC
Session: gspace1-166.2
Agent: angular
Confidence: 95%
Status: β
Documented
π Decision Context
Question:
How to fix auth/sign-in in gograb-ai app for browser users?
Task: Fix auth/sign-in in gograb-ai app
π― Decision Made
Chosen:
Expanded desktopAuthGuard β appAuthGuard to enforce auth for ALL contexts (browser, desktop, mobile, embedded). Added /login route using shared LoginComponent from @auth-ui. Removed inline login popover. Set AUTH_LOGIN_ROUTE='/login' and AUTH_REDIRECT_STRATEGY='navigate'. Added provideApiConfig() for explicit API URL configuration.
Options Considered:
- Create separate browser auth guard + keep desktopAuthGuard
- Use strictAuthGuard from @auth-ui directly on all routes
- Expand desktopAuthGuard to handle browser context too (chosen)
π Reasoning
The existing guard had return true for plain browser access β a security gap. Reused the proven DRY pattern from gograb-admin: thin wrapper around shared LoginComponent, strictAuthGuard equivalent in the guard, loginPageGuard on /login route. Zero shared lib changes needed β everything already existed in @auth-ui. Single guard handles all contexts with context-aware redirect (browserβ/login, nativeβ/welcome).
π Files Involved
apps/gograb-ai/src/app/core/guards/desktop-auth.guard.tsapps/gograb-ai/src/app/pages/login/login.component.tsapps/gograb-ai/src/app/app.routes.tsapps/gograb-ai/src/app/app.config.tsapps/gograb-ai/src/app/app.component.tsapps/gograb-ai/src/app/app.component.htmlapps/gograb-ai/src/app/app.component.scss
π Related
- Decision ID:
dev_1772466915340_ge5y0q1 - Session: 166
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation