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

Does not Work on production #43

Open
thorvh opened this issue Aug 12, 2020 · 3 comments
Open

Does not Work on production #43

thorvh opened this issue Aug 12, 2020 · 3 comments

Comments

@thorvh
Copy link

thorvh commented Aug 12, 2020

Hi,
thanks for your package.

It works very well on my localhost...

this is my function on Controller

function sendLoginLink()
    {
        $user = User::find(2);

        $generator = new LoginUrl($user);
        $generator->setRedirectUrl('/home'); // Override the default url to redirect to after login

        return $generator->generate();
    }

which returns this link

http://127.0.0.1:8000/magic-login/2?expires=1615255572&redirect_to=%2Fhome&user_type=app-user&signature=a6255a266fd1568108f5309876aeb8fc416204b1088bb379c050558bde834f81

On live production I got this error:

Symfony\Component\Routing\Exception\RouteNotFoundException Route [] not defined.

I made a few attempts and realized that the error is generated by $generator->generate();
I don't understand why..

@radulit1
Copy link

I was getting the same error. Running this fixed it for me:
php artisan config:cache
php artisan cache:clear
php artisan route:cache

@xtfer
Copy link

xtfer commented Mar 1, 2022

For anyone else hitting this, it is likely because you haven't published the config (or added the environment variables as documented).

Run php artisan vendor:publish and choose passwordless-login-config.

@ChrisRAra
Copy link

I was able to fix the issue by adding target="_blank" in my mail template on the verify link / button

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

4 participants