Cannot log in through /login with non-admin accounts, while /admin works

Issue Description

When trying to access website.abc/login, I cannot log in with standard user accounts, but the admin account works.

I have verified that the credentials are 100% correct.

Two-factor authentication (2FA) is enabled for the admin account, but not for the user accounts.

I have tested 3 different user accounts, and none have worked.

Expected Behavior

I should be able to log in with all accounts through mail.example.com/login.

Actual Behavior

The UI displays the following error: “Temporary server failure. If the problem persists, contact your administrator.”

The browser console shows:

Failed to load resource: the server responded with a status of 404 ()
login:1 Invalid or missing redirect_uri: null Error: missing redirect_uri
at login:1:9797
at p (login:1:10138)
at login:1:12221

Reproduction Steps

  1. Attempt to log in through https://mail.example.com/login.

  2. Observe the error: “Temporary server failure. If the problem persists, contact your administrator.”

Relevant Log Output

I have no logs for this failed attempt in Docker.

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

Additional Context

Logins through email clients like Thunderbird are working as expected.
Logins through website.abc/admin are also working as expected for standard user accounts.
Setup: Docker, Caddy, Stalwart

Sorry cant do many links, new account limits.

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I agree to follow the project’s Code of Conduct.

on

I’m not sure, but I have set up a new instance of Stalwart, and my assumption of being able to log in at mail.example.com/login seems to be wrong. In the docs, I can only find mail.example.com/admin.

you should be able to login to non-admin accounts at /account :]

the /login path you’re thinking of is appended to the base paths of the web application, which are /account and /admin

there is also a /login path at the root of the server, for the built-in OIDC provider, but it must be accessed via a redirect from somewhere that wants the credentials, such as /account, /admin, or a mail client

The root /login isn’t a page you open directly, it’s the OAuth/OIDC authorization endpoint. It only works when it’s reached as part of a redirect (from /account, /admin, or a mail client), which is why opening it on its own gives “Temporary server failure” and you see redirect_uri: null in the console. There are no OAuth parameters on the request, so there’s nothing to redirect back to.

End users should log in at https:///account (the self-service portal); admins at /admin. The accounts themselves are fine, your mail-client and /admin logins working confirm that. @coyote already pointed you the right way above.