I got TOTP in unison with my 2FAS authenticator (Android) working in this way:
In my server’s terminal I run:
sudo -u www-data /var/www/nextcloud/occ app:enable twofactor_totp
At my 2FAS Auth app I press the plus sign and scan the QR code provided at: Personal Settings → Security (Enable TOTP).
I test the 2FA functionality by confirming the code given at the 2FAS Auth app.
ernolf
August 10, 2024, 8:33pm
2
devplan:
I got TOTP
You can upvote for some crispy new features here:
nextcloud:master
← nextcloud:ernolf/configurable_options
README.md:
![image](https://github.com/user-attachments/assets/70161fe2-d350-4e… 98-a6ca-792286be8b19)
---
no TOTP set up:
![image](https://github.com/user-attachments/assets/c97b66fa-9d3d-4328-91b3-c1a9a7c178cd)
---
Click Enable:
![image](https://github.com/user-attachments/assets/70b40178-8b25-4265-bc14-072af5a067ad)
---
Click "Advanced Settings":
![image](https://github.com/user-attachments/assets/c2927af9-6234-4a04-a3f1-0f92182db8e5)
---
Enter invalid secret:
![image](https://github.com/user-attachments/assets/16e9695a-00b5-48ca-bb0c-6981f55a8668)
The colors (here yelow, blue and red) are defined in the css of your theme:
```
.warning-message {
color: var(--color-warning);
}
.instruction-message {
color: var(--color-info);
}
.error-message {
color: var(--color-error);
}
```
---
If any changes made, "Recreate QR-Code with custom settings" becomes clickable:
![image](https://github.com/user-attachments/assets/67185e51-933b-461b-a2de-7fb260233770)
---
Once clicked, a new QR Code is created and can be scanned:
![image](https://github.com/user-attachments/assets/23832b16-8c4e-4c1b-9d59-36a341d596bd)
---
After verification with an OTP:
![image](https://github.com/user-attachments/assets/48415077-6907-40a7-be47-a657071df33f)
---
The "Advanced Settings" button for subsequent changes is removed now, since it became redundant as it is much easier and safer to apply custom settings via the setup where it can be tested immediately with the OTP.
---
If the QR-code is scanned with Free-OTP or Free-OTP+, the actual favicon wil be used as icon for the account.
---
Since this PR makes it possible to enter a custom secret, #1439 could be closed too.
TODO:
* ~migration needs to be tested.~ Done :heavy_check_mark:
* l10n
By the way, TFAS comes with a very limmited range of options. It only can handle tokens from 6 to 8 digits and only the 30 seconds period. No Icons for the accounts etc. If you want a really good TOTP app for android, I would like to recommend Aegis.
Much and good luck,
ernolf