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

When I click the "Enable Two-Factor" button I get an error #32

Open
bit-pax opened this issue Sep 20, 2023 · 1 comment
Open

When I click the "Enable Two-Factor" button I get an error #32

bit-pax opened this issue Sep 20, 2023 · 1 comment

Comments

@bit-pax
Copy link

bit-pax commented Sep 20, 2023

When I click the "Enable Two-Factor" button I get the following error:

Target [Laravel\Fortify\Contracts\ConfirmPasswordViewResponse] is not instantiable.

The url it takes me to is:

/user/confirm-password

but I don't a user folder with a confirm-password blade. There is a confirm-password blade file in the auth folder. Is it supposed to route to that one?

--

EDIT: I realized uncommenting the following lines in the FortifyUIServiceProvider fixes the error:

    Fortify::confirmPasswordView(function () {
        return view('auth.confirm-password');
    });

    Fortify::twoFactorChallengeView(function () {
        return view('auth.two-factor-challenge');
    });

However I get the following error:

Call to undefined method App\Models\User::twoFactorQrCodeSvg()

Looks like it's the part that would display an image for Google Authenticator but it seems this class doesn't exist. Could use a little help.

@zacksmash
Copy link
Owner

Have you followed these instructions:

https://github.com/zacksmash/fortify-ui#two-factor-authentication

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