-
|
I have a Hostinger VPS running Dokploy on Ubuntu Server 24.04. when I try and sign in, I get to the 2FA page and I enter my current 2FA code, and then it just sits there with a "busy" spinner forever.. if I open the "Network" panel in my devtools before submitting the form, I can see that the HTTP request to the I have had a similar issue in the past, but in those cases I would hit F5 to refresh the page and then I would be signed in. so it was almost like the form submitted properly, but the callback to redirect my browser didn't fire. this time, however, refreshing the page takes me back to the login prompt.. and then to the 2FA prompt.. and then I sit with the I've tried searching both the issues and discussions here on GitHub, and I've chatted extensively with Claude AI, but I still cannot work out what is causing this.. can someone please help me work out what's gonewrong and how to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi @ZaLiTHkA! I'm Dosu and I’m helping the dokploy team. Hey @ZaLiTHkA, this is a commonly reported issue caused by a mismatch in the Fix Option 1 — Restore the original auth secret (try first): Set the environment variable on your Dokploy container: BETTER_AUTH_SECRET=better-auth-secret-123456789Then restart Dokploy. If you never changed this from the default, this should allow your existing 2FA to work again [2]. Fix Option 2 — Reset 2FA directly in the database: If the above doesn't work, you can disable 2FA via PostgreSQL: -- Find your user
SELECT id, email FROM "user";
-- Remove 2FA records
DELETE FROM two_factor WHERE "userId" = '<your_user_id>';
-- Disable the 2FA flag
UPDATE "user" SET two_factor_enabled = false WHERE id = '<your_user_id>';After this you can log in without 2FA and re-enable it [1]. Checking logs for more info: docker service logs dokployThis may reveal the underlying error (timeout, decryption failure, etc.). Going forward, make sure you have a stable To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
@dosu, I did see discussion #4068, but that specifically mentions getting error regardless, I thought it was worth trying to remove the 2FA requirement from my user's login (FYI: the column in the please can a real person help me here? I'm sure it's something simple that I'm missing, I just don't know what that is. this VPS is just a personal playground, nothing too important, so I'm happy to wait a while for a response. |
Beta Was this translation helpful? Give feedback.
A real person to the rescue.
docker ps -qf "name=^dokploy-postgres"docker exec -it <id> /bin/bashpsql -U dokployselect id, two_factor_enabled from "user";, witness something like this:"t" means "true" here
6. Update the table to turn 2fa off for this user:
UPDATE "user" SET two_factor_enabled = false where id = '<user_id>'7. Remove the dangling 2fa:
DELETE FROM two_factor WHERE user_id = '<user_id>'Should work now!