Remove 2FA for a user with Bookwyrm

Billet posté le 30 oct. 2023

How to remove 2FA for a user?

A few months ago I installed a bookwyrm instance. You can find it at https://bookwyrm.lovetux.net.

I’ve got a few users signed up. One day I receive an email from one of my users telling me that he can no longer authenticate because his 2FA phone has died. I searched in the documentation as well as on Mastodon and Matrix, but I had trouble finding the solution, even though it’s actually very simple.

Here are the commands to type:

sudo su - bookwyrm
venv/bin/python manage.py remove_2fa <user>

Note that these commands work because my Bookwyrm instance is not in docker but in a virtual machine.

Comment supprimer le 2FA pour un utilisateur ?

Il y a quelques mois j’ai réalisé l’installation d’une instance bookwyrm. Vous pouvez la trouver sur https://bookwyrm.lovetux.net.

J’ai quelques utilisateurs qui se sont inscrits. Un beau jour je reçois un email d’un de mes utilisateurs m’indiquant qu’il ne peut plus s’authentifier car son téléphone qui lui sert pour la 2FA est mort. J’ai cherché dans la documentation ainsi que sur Mastodon et Matrix mais j’ai eu du mal à trouver la solution alors qu’en fait c’est très simple.

Voici les commandes à taper :

sudo su - bookwyrm
venv/bin/python manage.py remove_2fa <user>

Il est à noter que ces commandes fonctionnent car mon instance Bookwyrm n’est pas en docker mais dans une machine virtuelle.