Auth 2FA: some issues
Hey all,
I've been tinkering around with the auth package, but have run into some issues, especially with the 2FA section.
- Am I missing something or is there no navigation to get back from the page where you can get the onetime codes ?
- Trying to regenerate the codes throws an error saying that the mothod called is not defined in the page.
Am I doing something wrong ?
Hey!
Thanks for reporting that bug with the regenerate codes! I've got a PR with a fix for this:
Regarding the navigation to the user 2fa page, if you are not utilizing Jetstream, you'll want a way for users to enable two-factor authentication. You can do this by directing users to /user/two-factor-authentication
or you can iframe this page into your app so that you could use your own layout.
Hope that this helps!
- Bobby
Thanks for submitting this!
I've went ahead and merged in the PR that Bobby submitted and I've tagged a new release with these fixes https://github.com/thedevdojo/auth/releases/tag/1.0.6
Appreciate it 😉
thank you all for the quick answers!
What I meant by redirection is that when the user navigates to the 2FA flow, there is no way for the user to go back to the application once 2FA is setup. Is this meant to be opened on a new page (or an iframe, I guess) ?
No worries, happy to help!
Yep, you can just use an iframe and you can embed that page into your application as you find fit! That way you will have your navigation as normal.
For example here is a simplified example on how to add this to the Breeze profile.blade.php file:
<div class="p-4 bg-white shadow sm:p-8 dark:bg-gray-800 sm:rounded-lg">
<div class="max-w-xl">
<iframe src="{{ url('/user/two-factor-authentication') }}" width="100%" height="800px" frameborder="0">
Your browser does not support iframes.
</iframe>
</div>
</div>
- Bobby
No problem! Good luck with your project!