Activate stephenjude-two-factor-authentication?
hi, i tried stephenjude-two-factor-authentication. I think it works. I can enable (and disable) 2FA but doesnt matter, there is no effect after logout / login. I dont have to put in a code. Maybe the reason is the code in user.php.
The 2fa is presumably ignored as result. But how do I integrate the 2fa there with canAcessPanel?
Solution:Jump to solution
Thanks for your work. I have also a fresh project and i am looking for a 2fa. I tried breezy, but have failed. But 2fa from Rawilk works for me. This is not anymore listet. Evereybody reccomend breezy. Maybe i trie it again. But at the end i am looking for an 2fa with email code (only), similar like github. Can breezy email code 2fa? Or can you recommend another (less complicated) plugin? It is also important to me that users can switch it on and off for themselves.
9 Replies
You should not handle authentication layer in access layer, authentication is passed before the access, have you added the TwoFactorAuthenticatable trait to the user model?
You mean that Yes.
so the issue is when you logout and login again it doesnt request the auth code right?
it logs you in straight away?
Yes, there is no request for auth code. I am landing on enable or disable page and everey time got to dashboard. I didnt make anything with EventServiceProvider (last part in doc).
Yes, it logs me in straight away without ->enforceTwoFactorSetup() and it brings me to enable if the force flag is active.
have you tried a fresh browser window or even a private browsing? am thinking it might be remembering the logins since you logged in before? maybe worth trying it
That was my thought as well, but same in another fresh browser. maybe a cache topic in laravel?
I just tried to replicate your issue with fresh project, seems to be working fine
but, seems the plugin has few issues, even with fresh project
myself, all my projects use Breeze and Breezy plugin never missed a tick, I would highly suggest considering it
Solution
Thanks for your work. I have also a fresh project and i am looking for a 2fa. I tried breezy, but have failed. But 2fa from Rawilk works for me. This is not anymore listet. Evereybody reccomend breezy. Maybe i trie it again. But at the end i am looking for an 2fa with email code (only), similar like github. Can breezy email code 2fa? Or can you recommend another (less complicated) plugin? It is also important to me that users can switch it on and off for themselves.
Hello, is it possible to make default route to
/login
instead of /app/login
?