[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)
Locked
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 1002
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

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

Post by AbaddonOrmuz »

Hi Paul,

I've briefly tested this extension and it's working so far, I understand that your have been busy but I wonder if there's a roadmap or a list of tasks to do, maybe the community could help with the development, this is something I would like to use on one of my boards.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26842
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 »

The most important part is testing (And then especially the develop branch, as that contains the most recent code). I will see if I can make an actual release from that branch today, but I need to check what the exact status is of that branch.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26842
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 »

Okay, I have made a bunch of fixes an a few language related changes, and made a new release.

Download: https://github.com/paul999/phpbb_2fa/re ... tag/v0.0.3
Please note: You should not really use this on a live board, unless you know what you are doing ;).
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 (And I won't submit it to the CDB unless I receive some feedback!).

For translations:
Please create a pull request on github containing the changes needed for your translation. I won't accept translations that aren't submitted as PR, or are incomplete.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
ivellios1988
Registered User
Posts: 14
Joined: Sat Jun 05, 2010 11:42 am

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

Post by ivellios1988 »

Well, I may be crazy but I decided to take a risk and test this extension on a live board :twisted: With codes served by Google Authenticator and other authenticator apps it works perfectly fine, excerpt for that it keeps logging users out after some period of time, and it happens even to users who checked the 'remember me' field when logging on.

I haven't tested it with U2F yet.
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 1002
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

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

Post by AbaddonOrmuz »

ivellios1988 wrote:
Sun Apr 07, 2019 1:40 pm
it works perfectly fine, excerpt for that it keeps logging users out after some period of time, and it happens even to users who checked the 'remember me' field when logging on.
I'm pretty sure that's a phpBB feature, session expires after some time if you do nothing, I've experienced that here when I leave an open tab.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
tojag
Registered User
Posts: 408
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

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

Post by tojag »

First attempt with v.0.0.3 in test environment - phpBB3.2.5, xampp3.2.2 (PHP7.2.6, MySQLi 10.1.33-MariaDB)
After trying to turn on the 2FA extension:

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
and the extension can't on.
Something with php settings?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26842
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 »

You will need to increase the memory limit in php.ini.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
User avatar
tojag
Registered User
Posts: 408
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

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

Post by tojag »

As always I have 128MB. I checked it before write here.

Under InterentExplorer and Chrome

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26842
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 »

The browser doesn't matter with php error ;). It tries to allocate over 128MB, so that means you will need to increase it.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
nou nou
Registered User
Posts: 404
Joined: Sat Oct 29, 2016 8:08 pm

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

Post by nou nou »

Hello! I thought I'd give this a shot :)

I have a very similar - if not identical - error trying to enable on a shared hosting test server:

Code: Select all

[Mon Apr 22 22:45:58 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 94371840 bytes exhausted (tried to allocate 2097152 bytes) in [filepath]/phpbb/db/migrator.php on line 953, referer: https://[forumurl]/adm/index.php?i=acp_extensions&sid=3d0498930f814a3588e7578f91f70a97&mode=main&action=enable_pre&ext_name=paul999%2Ftfa
White screen in the browser, extension not enabled, though some database data is seemingly being created (I see the 'delete data' option appear in the Manage Extensions ACP screen after doing this).

I have never encountered this error and I am running (and testing) a LOT of extensions. Are you sure that there is nothing iffy going on at the extension level?

Could I ask what is the memory limit you would recommend for this extension (and why would it appear to need a lot)? Before I try fiddling with mine...

Thanks!
User avatar
tojag
Registered User
Posts: 408
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

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

Post by tojag »

After increase memory limit to 256M.

Code: Select all

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
After increase limit to 512MB.

Code: Select all

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
and still can't ON the extension :(
ivellios1988 wrote:
Sun Apr 07, 2019 1:40 pm
Well, I may be crazy but I decided to take a risk and test this extension on a live board :twisted: With codes served by Google Authenticator and other authenticator apps it works perfectly fine,
What version of phpBB, php, mysql do You use?
ivellios1988
Registered User
Posts: 14
Joined: Sat Jun 05, 2010 11:42 am

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

Post by ivellios1988 »

PHP: 5.6.40
phpBB: 3.2.5
MySQL 5.6.42-log
My forum runs on shared hosting in OVH. Memory limit is 512 megabytes.
User avatar
tojag
Registered User
Posts: 408
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

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

Post by tojag »

Thanks for the info. PHP 5.6.40 is very old.
Paul, is there any requirements for PHP version?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26842
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 »

No, it has the same requirements as phpBB itself.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
nou nou
Registered User
Posts: 404
Joined: Sat Oct 29, 2016 8:08 pm

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

Post by nou nou »

Just wanting to ask specifically - is it normal that the memory requirements for activating the extension are very high seeming? I've so far not encountered an extension I can't enable for lack of memory. But it could be the nature of this beast, of course :)
Locked

Return to “Extensions in Development”