cypht-docker icon indicating copy to clipboard operation
cypht-docker copied to clipboard

Unable to generate 2 factor authentication QR code

Open Drudoo opened this issue 6 years ago • 3 comments

Using the environment variable CYPHT_MODULE_2FA=enable i get the error "Unable to generate 2 factor authentication QR code"

Drudoo avatar Oct 30 '18 08:10 Drudoo

Attach to cypht container and try the following to fix:

apk add nano
apk add composer
cd /usr/local/share/cypht
composer install
mv ./modules/2fa/2fa.ini /var/lib/hm3/app_data/
nano ./modules/2fa/2fa.ini

and set up the 2fa_secret variable value.

Razvan0925 avatar Mar 14 '19 20:03 Razvan0925

While the previous answer would work, it would not persist your config through a container reboot meaning you would have to perform those steps any time the container restarted.

Instead, try the following:

  • On your host machine, create a 2fa.ini file
  • Configure it with your values
  • Mount it as a volume into the container to the destination /var/lib/hm3/app_data/2fa.ini

This should give you working 2 factor authentication that persists across container restarts.

justinvoelker avatar Mar 21 '19 21:03 justinvoelker