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:

  1. Create separate browser auth guard + keep desktopAuthGuard
  2. Use strictAuthGuard from @auth-ui directly on all routes
  3. 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


πŸ”— Related


Auto-generated by MCP Smart Consolidation