How do I enable TFA in Drupal 8?

I’m creating a Drupal 8 website and wish to enforce two factor authentication for admins. In order to do this, I downloaded the module here:

In order to enable the module, it required I download and install the Encrypt and Key modules, which I have.

Drupal now allows me to check the box to enable TFA, but when I do, it comes up with an error saying: “Please install the ‘christian-riesen/otp’ library via composer. See the module README for instructions.”

I have installed composer on my server, and then followed the instructions here:

The server returned that I was now using version 2.2 of the package. When I went to go install the TFA module again, however, I got the same error as before, even though I had the ‘christian-riesen/otp’ library already. Have I installed it in the wrong location? How can I fix this?

I checked to see if the library was installed still with the command php composer.phar show christian-riesen/otp, and it was still installed.

I am running a Drupal instance through Google Cloud and ran these commands in my Bitnami Drupal SSH.

I contacted Christian, but he is not fluent in Drupal. I would greatly appreciate any assistance. Please let me know if you can help or if anyone has gotten ANY two factor to work on Drupal 8.

Thank you,


Drupal version: