nspeaks Hi, are you the only User that has 2FA activated, or, there is other users that utilise it as well? There is 2 Methods that i can suggest to regain your access back without 2FA Access Code in hand and you may decide which works the best for you:
⚠️First, Conduct a Full [Comprehensive] Backup of your Account and a Specific Backup of your Database Tables.
Just in case, if anything went unexpected.
Method #1
If you would like to just disable it specifically for your user admin access without affecting other users that had configured 2FA via the same extension as well.
⚠️This method requires an attention to detail as well as a basic database management knowledge as you're about to ammend the database info and table directly.
Access your Database Tool [phpMyAdmin or any that you/your host uses] >> Choose and Click your Flarum
Database >> Click/Browse on the two_factor
table line >> find your user_id
>> Delete
.
Then, Clear your Browser's cache and try if it works.
⚠️Do Not get confused between the users
table and two_factor
table as you just like to remove 2FA from the particular user and not remove the user itself, therefore, you would select the two_factor
table in line and then from there find your user_id
to delete the 2FA Key from that particular user without affecting other users.
Method #2
If you would like to entirely remove the extension as well as its configuration - All data associated with the extension would be eliminated as well.
*Root/Administrative Access at the Server level with Command Line Interface is required. If you don't have as such or less sure on how to execute as below, You may request your web host to assist you.
First:
composer remove ianm/twofactor
Then:
php flarum cache:clear
Upon completion, Clear your Browser's cache and see if it works.
Hope any either helps to resolve at the best out of it.