To Reproduce
Steps to reproduce
- Navigate to Dokploy login page
- Enter valid credentials and submit
- POST
/api/auth/sign-in/email returns 200 OK
- UI stays on login page, infinite loading spinner
- Manually reload → logged in successfully
Current vs. Expected behavior
Problem
After submitting the login form, the UI gets stuck on infinite loading. No redirect occurs. If I manually reload the page (F5), I'm already logged in — the session was created correctly.
This happens 100% of the time, on every login attempt.
Also reproducible accessing directly via ip:3000, so it's not a Cloudflare/proxy issue.
Expected behavior
After successful authentication, the frontend should navigate to /dashboard (or equivalent).
Provide environment information
### Environment
- `BETTER_AUTH_URL` is set correctly to the HTTPS domain
- `BETTER_AUTH_SECRET_FILE` uses Docker Secrets (value confirmed present and valid)
- Sessions are created correctly in the DB (`expires_at` is in the future)
- No errors in `docker service logs dokploy` related to auth or postgres at login time
- NTP synchronized: yes
**Dokploy version:** v0.29.5
**OS:** Ubuntu
**Access method:** Custom domain with HTTPS (Cloudflare DNS + Traefik + Let's Encrypt)
**Deployment type:** Single server, Docker Swarm
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
Network tab (DevTools)
Only one request is made after clicking login:
POST /api/auth/sign-in/email
Status: 200 OK
Response body:
{
"redirect": false,
"token": "...",
"user": { ... }
}
No subsequent requests are made. The frontend receives redirect: false and does not navigate anywhere.
Additional notes
This appears related to PR #4335 ("fix: use temporary redirects for auth checks in getServerSideProps") introduced in v0.29.3, but the issue persists in v0.29.5.
The better-auth client returns redirect: false by default when called from the browser without an explicit redirectTo parameter. The frontend needs to handle this case and perform a manual router.push() after receiving a successful auth response.
Will you send a PR to fix it?
No
To Reproduce
Steps to reproduce
/api/auth/sign-in/emailreturns 200 OKCurrent vs. Expected behavior
Problem
After submitting the login form, the UI gets stuck on infinite loading. No redirect occurs. If I manually reload the page (F5), I'm already logged in — the session was created correctly.
This happens 100% of the time, on every login attempt.
Also reproducible accessing directly via
ip:3000, so it's not a Cloudflare/proxy issue.Expected behavior
After successful authentication, the frontend should navigate to
/dashboard(or equivalent).Provide environment information
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
Network tab (DevTools)
Only one request is made after clicking login:
Response body:
{ "redirect": false, "token": "...", "user": { ... } }No subsequent requests are made. The frontend receives
redirect: falseand does not navigate anywhere.Additional notes
This appears related to PR #4335 ("fix: use temporary redirects for auth checks in getServerSideProps") introduced in v0.29.3, but the issue persists in v0.29.5.
The
better-authclient returnsredirect: falseby default when called from the browser without an explicitredirectToparameter. The frontend needs to handle this case and perform a manualrouter.push()after receiving a successful auth response.Will you send a PR to fix it?
No