Oh no, did you enable the Third Party Login Only extension and you have now locked yourself out as administrator? First of all, good job! We'll to think about more warnings now 😅
The good news is, you're not the only one, it already happened countless of times before. There are three options you can choose for.
The easy way: Sign in with the same email address
You can try signing in with the oAuth platform you have enabled on your forum.
If your email address matches the email address of your admin account, it will automatically connect to your original admin account.
The usual way: Removing the extension via composer
Just execute the following code in your Flarum's root folder:
composer remove v17development/flarum-third-party-login-only
This will remove the extension and 'errors' Flarum out because the folder doesn't exist anymore. This will automatically disable the extension and your forum keeps running without problems.
The hard way:
This is a little more dificult and requires requires access to your database.
Open your database manager of choise to enter the database. I've chosen
PHPMyAdmin for this example.
Open your Flarum database
In a long list of table names, you will find a table name called
Open the table
Look for the
Edit the row, you'll find a long list of data (an array). Make a copy of the text.
Remove the part
Save your changes and go to back to your forum
You should now be able to login with your username and password again.