grosv / laravel-passwordless-login

A simple, safe magic login link generator for Laravel
841 stars 60 forks source link

Redirecting on success - config overriding #82

Closed danabrey closed 2 years ago

danabrey commented 2 years ago

Hey, quick question.

In HandleAuthenticatedUsers, there is the following code:

                $home = class_exists(\App\Providers\RouteServiceProvider::class)
                    ? \App\Providers\RouteServiceProvider::HOME
                    : config('laravel-passwordless-login.redirect_on_success', '/');

Is there a reason the config value is not used ahead of the HOME constant? We always want the user redirected to a particular route when logged in via passwordless, a route that isn't the same as the HOME constant value.

edgrosvenor commented 2 years ago

@danabrey Thanks for reporting this. I just merged in a PR that should fix this and am about to do a release. Let me know if the problem persists.

danabrey commented 2 years ago

@edgrosvenor Thanks a lot for this fix, Ed, I can confirm upgrading the package fixed the issue for us.