837d1196d0386ddfd84f88a32a59b080181f27ed
Race condition between signUp/signIn completion and ProtectedRoute's useSession() call caused redirect loops — Better-Auth's session cookie is not immediately visible to useSession() after signUp/signIn resolves. Fix: call authClient.getSession() explicitly after signUp/signIn to synchronize before navigating to protected routes. Fall back to error message if session not confirmed. Also removes dead setAuthenticated() calls that only work in mock mode. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Description
Languages
TypeScript
95.3%
Shell
2.9%
Dockerfile
0.5%
JavaScript
0.5%
HTML
0.5%
Other
0.3%