Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot activate 2FA | nothing happens #529

Open
TimoB2005 opened this issue Oct 31, 2023 · 6 comments
Open

Cannot activate 2FA | nothing happens #529

TimoB2005 opened this issue Oct 31, 2023 · 6 comments

Comments

@TimoB2005
Copy link

What steps will reproduce the problem?

  • 'enableTwoFactorAuthentication' => true | in config
  • go into account settings and try to activate 2fa

What is the expected result?

  • activated 2fa

What do you get instead?

Thats the button that should trigger that:
https://github.com/2amigos/yii2-usuario/blob/master/src/User/resources/views/settings/account.php#L130

PHP: 8.1.2
Composer:

        "yiisoft/yii2": "~2.0.14",
        "yiisoft/yii2-bootstrap4": "~2.0.0",
        "2amigos/yii2-usuario": "~1.6.1",
        "2amigos/2fa-library": "^2.0.2",
        "2amigos/qrcode-library": "^2.0"
@edegaudenzi
Copy link

edegaudenzi commented Nov 13, 2023

I'm running Yii2 (advanced project) version 2.0.49.2 on Apache2, MySQL8, PHP 8.1.2

In composer I've required the following packages:

require 2amigos/yii2-usuario "^1";
require 2amigos/2fa-library "^2";
require 2amigos/qrcode-library "^2";

Ending up having installed:

2amigos/yii2-usuario:1.6.1
2amigos/2fa-library:2.0.2
2amigos/qrcode-library:2.0.0

In my common\config\main.php::modules->user->twoFactorAuthenticationValidators array (User Guide) I've specified :

'google-authenticator'=>[
	'class'            =>'\Da\User\Validator\TwoFactorCodeValidator',
	'description'      =>'Authenticator App',
	'configurationUrl' =>'user/settings/two-factor',
	'enabled'          =>true
],

Everything seems to be working just fine. Hope to have been of any kind of help.

@TimoB2005
Copy link
Author

@edegaudenzi what bootstrap version?

@TimoB2005
Copy link
Author

2023-11-13.18-12-14.mp4

So my problem is when i click on one method nothing happens but when i type in my password click save then the 2fa field changes.

I can activate like email 2FA and get the Mail but nothing opens to type in the code or similar

@edegaudenzi
Copy link

I'm using the one for Yii2, yiisoft/yii2-bootstrap:2.0.11. Video is very explanatory, it should show you a popup with a qrcode indeed. In the very moment when you click, anything in the webserver logs, Yii2 logs, browser 'console' or browser 'network' tabs?

@TimoB2005
Copy link
Author

I'm using the one for Yii2, yiisoft/yii2-bootstrap:2.0.11. Video is very explanatory, it should show you a popup with a qrcode indeed. In the very moment when you click, anything in the webserver logs, Yii2 logs, browser 'console' or browser 'network' tabs?

What is your AppAsset.php on that bootstrap?

I am using currently "yiisoft/yii2-bootstrap4": "~2.0.0",

Would like to try with your version.

No errors and logs but when i click on save with password and then execute like email 2fa an Request gets called and i get the Mail too.
But nothing Opens or something. I guess its a Bootstrap Problem

@TimoB2005
Copy link
Author

Okay got things running up with your bootstrap version.

Now the Div looks like the one when i enter my password instantly.

But the thing is i still need to enter my password click on save and then the modal sends me mail.

When i only click 2fa without saving user data before nothing happens.

Then it opens the input field but there is a div before so i cant click anything in the code field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants