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

2 Factor Authentication Ignored #20

Closed
klexas opened this issue Jan 9, 2021 · 8 comments
Closed

2 Factor Authentication Ignored #20

klexas opened this issue Jan 9, 2021 · 8 comments

Comments

@klexas
Copy link

klexas commented Jan 9, 2021

Describe the bug
2 Factor Authentication is skipped completely

To Reproduce
Steps to reproduce the behavior:
Register an account in application
Proceed to Profile section
Enable 2 factor auth
Sign out
Log in again

  • 2 Factor Authentication is ignored. And user proceed without challenge.

Expected behavior
2 Factor Challenge should be prompted

Additional context
I did check all enabled features, updated the

           action="{{ route('two-factor.login') }}

I'm not familiar enough with the fortify to know whats happening.

@tsommie
Copy link
Contributor

tsommie commented Jan 10, 2021

Are you using livewire or inertia?

@tsommie tsommie closed this as completed Jan 10, 2021
@tsommie tsommie reopened this Jan 10, 2021
@vernk
Copy link

vernk commented Jan 23, 2021

Two factor is not working correctly on Livewire

It should make the user enter the code to verify when enabling it

@tsommie
Copy link
Contributor

tsommie commented Jan 23, 2021

I haven't taken a deep look at it yet but I think the problem is caused by the missing app.js script that contains alpine.js which handles the automation in the page.

Add the below tag in your guest.blade.php head section and let me know if it does the trick.

<script src="{{ mix('js/app.js') }}" defer></script>

@vernk
Copy link

vernk commented Jan 24, 2021

Yes that solved that bug, but what about making them enter their code, before 2FA is actually enabled. To make sure their device is paired? Almost all websites do this

As if they enable it and don't pair, they will be locked out of their account

@vernk
Copy link

vernk commented Jan 24, 2021

laravel/jetstream#74

Found this issue Jetstream so maybe its a feature request?

@tsommie
Copy link
Contributor

tsommie commented Jan 24, 2021

Ok, a new tag has been released to address this issue v2.1.4. Thanks

@tsommie tsommie closed this as completed Jan 24, 2021
@laravel-user-x
Copy link

laravel-user-x commented Feb 3, 2021

Hi, I'm still not getting the 2fa screen after 2fa is enabled. I have the latest 2.1.5 update. I can see the app.js script is included within the guest.blade.php but once I enable 2fa and then try and login, it takes me straight to the dashboard without showing the 2fa screen.

@paolocaccavo
Copy link

paolocaccavo commented Apr 5, 2022

Yes, I am having the same issue with Laravel 9, PHP 8.1, jetstrap v2.5.4, jetstream v2.7.1

two_factor_confirmed_at just doesn't get written in the DB and stays null.

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

5 participants