YunoHost-Apps / vaultwarden_ynh

Open source password management solutions for YunoHost
https://bitwarden.com/
GNU General Public License v3.0
54 stars 17 forks source link

Reinstalling VaultWarden -> Admin Token error #206

Closed rob-hills closed 1 year ago

rob-hills commented 1 year ago

Describe the bug

When you install VaultWarden it triggers an automated email to the administrator containing an Admin Token. If you uninstall VaultWarden and reinstall it again, it sends a new automated email with a new Admin Token, but the new token doesn't work.

You need to use the original Admin Token generated by the first installation to be able to log in successfully.

Context

I originally installed VaultWarden using my own personal YunoHost login as the VaultWarden Administrator but then discovered that this then prevented me from creating my own VaultWarden account using the same email :-(

So, I uninstalled VaultWarden, created a VaultWarden Admin user in YunoHost and then reinstalled VaultWarden using my new VaultWarden Admin user.

Steps to reproduce

Expected behavior

I expected VaultWarden to permit login using the Admin Token sent after the second installation and not permit login using the original Admin Token from the first installation.

Logs

I couldn't see anything relevant in the installation log but I can provide the installation log for the second installation if required.

yalh76 commented 1 year ago

That's because the database containing the masterkey is stored appart in /home/yunohost.app/vaultwarden.

When reinstalling, it uses the already existing database.

If you want to have a new masterkey, you should remove vaultwarden purging the datadir: yunohost app remove vaultwarden --purge