[CDB] phpBB two factor authentication

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
MaxHayman
Registered User
Posts: 5
Joined: Mon Jul 08, 2019 3:02 pm

Re: [3.2][DEV] phpBB two factor authentication

Post by MaxHayman »

Am I right that if we set "Require 2FA for all users" it will force all users to add a 2fa and require it to log in every time?

Is there an option which is 'Users can add 2FA if they want. but if they do they will need it to login."

Edit: Seems to be "Do not require 2fa"


However I seem to be automatically logged out every ~15m. Anyone know the cause of this?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul »

MaxHayman wrote: Fri Jul 12, 2019 8:31 pm Hey,

Would it be possible to require certain fields to be populated in the user profile when they enable 2FA? Ideally we would like to have their First and Last name on their profile to verify if they forget their 2FA codes.

Thanks
This isn't something this extension will do. You will need to request a new extension for it.
MaxHayman wrote: Sat Jul 13, 2019 6:31 pm Am I right that if we set "Require 2FA for all users" it will force all users to add a 2fa and require it to log in every time?
yes.
Is there an option which is 'Users can add 2FA if they want. but if they do they will need it to login."

Edit: Seems to be "Do not require 2fa"
yes that's the right option

However I seem to be automatically logged out every ~15m. Anyone know the cause of this?
that sounds like your cookie settings are incorrect.
kik0lasi
Registered User
Posts: 1
Joined: Sun Jun 16, 2019 4:01 pm

Re: [3.2][DEV] phpBB two factor authentication

Post by kik0lasi »

MaxHayman wrote: Sat Jul 13, 2019 6:31 pm However I seem to be automatically logged out every ~15m. Anyone know the cause of this?
This also happens to me only with an account that has the authentication activated. I've checked my cookie settings and they seem to be correct, and working in the other accounts.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul »

I have found the cause of the logout issue, I was using a wrong field and as such the remember me was not properly reconised. This will be fixed in the next release.
ivellios1988
Registered User
Posts: 28
Joined: Sat Jun 05, 2010 11:42 am

Re: [3.2][DEV] phpBB two factor authentication

Post by ivellios1988 »

I'm aware that using your 2fa plugin in current development state in production environment may be risky, but I decided to take the risk and installed it on my forum. Everything works fine, apart from that, since some two weeks, on my main laptop I have to log in to my forum every two hours of so because, for reason unknown, it keeps logging me out (what's interesting, the issue seems not to appear on my second laptop and smartphone). This logging out occurs regardless if I'm active (i. e. browsing homepage, sending posts, etc.) or not. Is there any way to fix this? I'm using Chrome on all devices.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul »

Try reading the very few posts above yours.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] phpBB two factor authentication

Post by Paul »

Version 0.0.5 has been released. I consider this version as the first BETA, and if no issues are reported in the upcoming weeks I will create the first release candidate, which also will be submitted to the extensions database.

Download: https://github.com/paul999/phpbb_2fa/re ... tag/v0.0.5
Please note: As with any extension in development, you should not use in on a live forum ;)

This releases fixes the logout issue, adds a few new features, and fixes a few other bugs that I noticed during development.

Please let me know if it works for you, or if you are having issues. Without any of those I won't be able to improve it.

For translations:
Please create a pull request on github containing the changes needed for your translation. I will be merging all complete translations before creating the first release candidate. Incomplete translations will not be merged at that point.
nou nou
Registered User
Posts: 501
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][BETA] phpBB two factor authentication

Post by nou nou »

So far so very good!

Logout issue is indeed fixed, and I can confirm that the extension also works when the board is disabled.

I had an odd issue where I had deleted the data for 0.0.4, and when enabling 0.0.5 all my keys and configs were still there. When deleting the data for 0.0.5 everything was gone as expected so I gather it's a non-issue.

A couple of small spelling mistakes in the UCP text I noticed:

If you loose your keys should be If you lose your keys
the configuration choosen -> the configuration chosen
only work in specific browser -> only work in specific browsers

I know you don't take feature requests right now, but I do have another (small?) one. After setting up an OTP key, in the Authenticator App (like Google Authenticator) the entry name is the [link to the forum]:[username]. Typically it's the name of the service, or site, and then a user identifier in round brackets. So something like [forum name]:([user@forumlink]) (example phpBB ([email protected])) - would that be doable?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] phpBB two factor authentication

Post by Paul »

nou nou wrote: Sun Sep 08, 2019 4:48 am So far so very good!

Logout issue is indeed fixed, and I can confirm that the extension also works when the board is disabled.

I had an odd issue where I had deleted the data for 0.0.4, and when enabling 0.0.5 all my keys and configs were still there. When deleting the data for 0.0.5 everything was gone as expected so I gather it's a non-issue.

A couple of small spelling mistakes in the UCP text I noticed:

If you loose your keys should be If you lose your keys
the configuration choosen -> the configuration chosen
only work in specific browser -> only work in specific browsers
Fixed it in GIT. Thanks, will be included in the next release :).
I know you don't take feature requests right now, but I do have another (small?) one. After setting up an OTP key, in the Authenticator App (like Google Authenticator) the entry name is the [link to the forum]:[username]. Typically it's the name of the service, or site, and then a user identifier in round brackets. So something like [forum name]:([user@forumlink]) (example phpBB ([email protected])) - would that be doable?
Hmm, I just checked, and the library I use doesn't seem to support this. I will need to look into it more closer, but it might be pretty hard to change unfortunately.
nou nou
Registered User
Posts: 501
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][BETA] phpBB two factor authentication

Post by nou nou »

Paul wrote: Sun Sep 08, 2019 2:50 pm Hmm, I just checked, and the library I use doesn't seem to support this. I will need to look into it more closer, but it might be pretty hard to change unfortunately.
It's minor. Aesthetically it would be nice and I can really get hung up on these things, but the extension won't be that much better for it :)

Just reporting back after a bit. I have not found any more issues with 2FA, everything works fine and it's great. However, before I would deploy this on a live board I would wait for my previous request to be fulfilled. Especially as an admin, you're testing stuff all the time, logging out, logging in, maybe using some test accounts. The amount of times I've had to go get my phone to fetch the authentication codes was a little much to be practical.

But other than that - superb! :)
decafgeek
Registered User
Posts: 2
Joined: Thu Oct 10, 2019 12:10 pm

Re: [3.2][BETA] phpBB two factor authentication

Post by decafgeek »

Hello,

I installed 0.0.5 into a fresh phpBB installation and received an error that caused a rollback. It looks like the file migrations/initial_version_interface.php that is called out in version_005.php is named in the master github repo as 'inital_version_interface.php' (missing an 'i').

I now get a 500 error when trying to enable the module (after fixing the file name) or clearing the module data. Would this be something I have to fix directly in the DB?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] phpBB two factor authentication

Post by Paul »

Please post the actual errors you are getting
decafgeek
Registered User
Posts: 2
Joined: Thu Oct 10, 2019 12:10 pm

Re: [3.2][BETA] phpBB two factor authentication

Post by decafgeek »

Please see the error below:

https://imgur.com/KnB80K8

This occurs when I attempt to enable 0.0.5 on a fresh installation.
igorbond
Registered User
Posts: 138
Joined: Sun Mar 24, 2013 5:54 pm

Re: [3.2][BETA] phpBB two factor authentication

Post by igorbond »

Code: Select all

Fatal error: Uncaught Error: Class 'paul999\u2f\U2F' not found in /var/www/southklad/data/www/maps.southklad.ru/forum/ext/paul999/tfa/modules/u2f.php:67 Stack trace: #0 [internal function]: paul999\tfa\modules\u2f->__construct(Object(phpbb\db\driver\factory), Object(phpbb\user), Object(phpbb\request\request), Object(phpbb\template\twig\twig), 'phpbb_tfa_regis...', './') #1 /var/www/southklad/data/www/maps.southklad.ru/forum/vendor/symfony/dependency-injection/ContainerBuilder.php(933): ReflectionClass->newInstanceArgs(Array) #2 /var/www/southklad/data/www/maps.southklad.ru/forum/vendor/symfony/dependency-injection/ContainerBuilder.php(467): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Object(SplObjectStorage), 'paul999.tfa.mod...') #3 /var/www/southklad/data/www/maps.southklad.ru/forum/phpbb/di/service_collection.php(72): Symfony\Component\DependencyInjection\ContainerBuilder->get('paul999.tfa.mod...') #4 /var/www/southklad/data/www/maps.so in /var/www/southklad/data/www/maps.southklad.ru/forum/ext/paul999/tfa/modules/u2f.php on line 67
Error: Fatal error: Uncaught Error: Class 'paul999\u2f\U2F' not found in /var/www/southklad/data/www/maps.southklad.ru/forum/ext/paul999/tfa/modules/u2f.php:67 Stack trace: #0 [internal function]: paul999\tfa\modules\u2f->__construct(Object(phpbb\db\driver\factory), Object(phpbb\user), Object(phpbb\request\request), Object(phpbb\template\twig\twig), 'phpbb_tfa_regis...', './') #1 /var/www/southklad/data/www/maps.southklad.ru/forum/vendor/symfony/dependency-injection/ContainerBuilder.php(933): ReflectionClass->newInstanceArgs(Array) #2 /var/www/southklad/data/www/maps.southklad.ru/forum/vendor/symfony/dependency-injection/ContainerBuilder.php(467): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Object(SplObjectStorage), 'paul999.tfa.mod...') #3 /var/www/southklad/data/www/maps.southklad.ru/forum/phpbb/di/service_collection.php(72): Symfony\Component\DependencyInjection\ContainerBuilder->get('paul999.tfa.mod...') #4 /var/www/southklad/data/www/maps.so at file /var/www/southklad/data/www/maps.southklad.ru/forum/ext/paul999/tfa/modules/u2f.php line 67
Image
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] phpBB two factor authentication

Post by Paul »

You will need to provide some more information. What did you do, when did it happen, what download did you use?
Locked

Return to “Extensions in Development”