[GH-ISSUE #11] Can't login after 1st setup in docker install #122

Closed
opened 2026-03-13 17:13:10 +03:00 by kerem · 2 comments
Owner

Originally created by @DwayneGoddem on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/adminsyspro/proxcenter-ui/issues/11

After starting a new clean Docker container I get the 1st setup for the user.

Create the new users with no problem.

Go back to login screen and it will not let me login. If I enter a bad password it tells me off for a bad password.
enter the correct password the sign in button flashing some different text then back to "Sign In"

I have tried on a Ubuntu host running on the proxmox host and in a windows host WSL docker host
both have the same issue.

This is using the docker community yaml from the file list via portainer custom templates.

There is nothing logged that I can see ether.

Any help on what might be going on here?

Originally created by @DwayneGoddem on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/adminsyspro/proxcenter-ui/issues/11 After starting a new clean Docker container I get the 1st setup for the user. Create the new users with no problem. Go back to login screen and it will not let me login. If I enter a bad password it tells me off for a bad password. enter the correct password the sign in button flashing some different text then back to "Sign In" I have tried on a Ubuntu host running on the proxmox host and in a windows host WSL docker host both have the same issue. This is using the docker community yaml from the file list via portainer custom templates. There is nothing logged that I can see ether. Any help on what might be going on here?
kerem closed this issue 2026-03-13 17:13:16 +03:00
Author
Owner

@adminsyspro commented on GitHub (Feb 19, 2026):

Hi, thanks for reporting this!

We identified the root cause: there was a secret mismatch between NextAuth and the middleware. When NEXTAUTH_SECRET is not set in the environment (which can happen with a manual Docker Compose deploy without a .env file), NextAuth used a hardcoded fallback to sign the JWT, but the middleware didn't have the same fallback — so it couldn't decode the token and silently redirected back to /login.

That's why:

  • Wrong password → error displayed (auth fails before middleware is involved)
  • Correct password → button flashes "Signing in..." then loops back to login (auth succeeds, JWT is set, but middleware can't verify it)

The fix has been pushed in 5eead8b. Pull the latest image and it should work.

As a workaround if you can't update immediately, make sure NEXTAUTH_SECRET is set in your container's environment (any random string will do, e.g. openssl rand -hex 32).

<!-- gh-comment-id:3925047152 --> @adminsyspro commented on GitHub (Feb 19, 2026): Hi, thanks for reporting this! We identified the root cause: there was a **secret mismatch between NextAuth and the middleware**. When `NEXTAUTH_SECRET` is not set in the environment (which can happen with a manual Docker Compose deploy without a `.env` file), NextAuth used a hardcoded fallback to sign the JWT, but the middleware didn't have the same fallback — so it couldn't decode the token and silently redirected back to `/login`. That's why: - Wrong password → error displayed (auth fails before middleware is involved) - Correct password → button flashes "Signing in..." then loops back to login (auth succeeds, JWT is set, but middleware can't verify it) **The fix has been pushed in `5eead8b`.** Pull the latest image and it should work. As a workaround if you can't update immediately, make sure `NEXTAUTH_SECRET` is set in your container's environment (any random string will do, e.g. `openssl rand -hex 32`).
Author
Owner

@DwayneGoddem commented on GitHub (Feb 19, 2026):

The update worked and I can login.

Now I can't add a PVE host i always get the error.
"Non authentifié"
I guess that means auth failed

I have followed the doc'o I guess you removed the option to add a host using username/password and only use API. I have done that and it will not add the host is the Proxmox VE 9.1.5

<!-- gh-comment-id:3929883465 --> @DwayneGoddem commented on GitHub (Feb 19, 2026): The update worked and I can login. Now I can't add a PVE host i always get the error. "Non authentifié" I guess that means auth failed I have followed the doc'o I guess you removed the option to add a host using username/password and only use API. I have done that and it will not add the host is the Proxmox VE 9.1.5
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxcenter-ui#122
No description provided.