promote: dev → uat (GRO-1236 OAuth callback fix) #413

Merged
the-dogfather-cto[bot] merged 2 commits from cto/gro-1236-promote-uat into uat 2026-05-14 19:36:14 +00:00

2 Commits

Author SHA1 Message Date
Chris Farhood 0f6a5ebe35 Promote dev→uat: OAuth callback session fix (GRO-1236) 2026-05-14 19:25:42 +00:00
groombook-engineer[bot] 050d478621 fix(GRO-1236): set VITE_API_URL and use /admin as OAuth callback URL (#403)
Two root causes fixed:
1. VITE_API_URL was empty in .env.production, so Better-Auth's client
   had no baseURL and could not correctly route the OAuth callback.
2. OAuth callbackURL was window.location.origin (root path), causing
   Better-Auth to redirect to / instead of /admin after login — since
   unauthenticated users at / are redirected to /login, this created a
   loop that appeared as 'session not persisting.'

With VITE_API_URL=https://uat.groombook.dev and callbackURL=/admin,
the callback lands on /admin which renders the admin layout and
correctly establishes the session cookie.

Co-authored-by: Chris Farhood <chris@farhood.org>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-05-14 19:25:36 +00:00