E-Mail Verification not working in Vaultwarden 1.29.2 on my FreeBSD

Hey Folks.

thanks for this great product - I’d like to switch from KeePaas to Vaultwarden.
I’ve installed Vaultwarden in a jail with FreeBSD on top of my TrueNAS from official FreeBSD package with pkg install vaultwarden:

vaultwarden-1.29.2
vaultwarden_web-vault-2023.7.1

Vaultwarden seem to be working - but I always have this DIV-Container with:

Verify email
Verify your account’s email address to unlock access to all features.

I’ve configured my local sendmail to receive e-mails locally, when I try to verify my e-mail, vaultwarden writes this to /var/log/messages:

Nov 13 12:15:56 vaultwarden vaultwarden[20381]: [2023-11-13 12:15:56.143][request][INFO] POST /api/accounts/verify-email-token
Nov 13 12:15:56 vaultwarden vaultwarden[20381]: [2023-11-13 12:15:56.143][vaultwarden::api::core::accounts][ERROR] User doesn’t exist
Nov 13 12:15:56 vaultwarden vaultwarden[20381]: [2023-11-13 12:15:56.143][response][INFO] (post_verify_email_token) POST /api/accounts/verify-email-token => 400 Bad Request

It is the same error message, when I enable, that users have to verify their e-mail to get access.

I even checked the SQLiite database, the user-id in database is the same as in the verify e-mail.

The verify e-mail has this link/format:

Verify this email address for your account by clicking the link below.

Verify Email Address Now: https://10.0.3.15/#/verify-email/?userId=3Da7c4b4=
5b-9b14-47b8-a638-cbc3ddd7cabd&token=3DeyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9=
.eyJuYmYiOjE2OTYR2HupL1SyUXqGcpzeDy9N11HM…

Is there anything wrong with my installation/configuration or is it a bug?

Thank you and BR
Matthias

Are you using a reverse proxy? Is that maybe blocking something?
Is the system only accessible via ip? A bad request indicates missing fields or incomplete body or something.

Hi Mathijs,

thank you for your reply and your ideas, it was IP only, but now I’ve added a FQDN hostname to the machine and defined this in my DNS server, but with the same behavior - user not found and bad request.

Yes, I use a reverse Proxy with this config:

server {

listen 443 ssl;

server_name vaultwarden.domain;

ssl_certificate     /etc/ssl/vaultwardenCert/bitwarden.crt;
ssl_certificate_key /etc/ssl/vaultwardenCert/bitwarden.key;

# Allow large attachments
client_max_body_size 128M;

location / {
    proxy_pass http://127.0.0.1:4567;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

location /notifications/hub {
    proxy_pass http://127.0.0.1:3012;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location /notifications/hub/negotiate {
   proxy_pass http://127.0.0.1:4567;
}

}

I’ve used this tutorial as template for my installation:

Best regards,
Matthias