grosv / laravel-passwordless-login

A simple, safe magic login link generator for Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when user is already authenticated but RouteServiceProvider::HOME is not defined

joe-pritchard opened this issue · comments

commented

An error is thrown by HandleAuthenticatedUsers.php if RouteServiceProvider::HOME is not defined. In my application I use the alternative home() method instead.

I've fixed it and opened a PR if it helps :) - #83

My PR checks for the existence of the home() method, and falls back to the constant if it's not defined, and if the constant is not defined either only then does it fall back to using the config value. It also handles the case where the programmer has changed their app namespace.

Everything else should work the same as it does now.

@joe-pritchard Thank you! I appreciate the PR. I was made aware of the issue earlier in the week, but my household is in the middle of a covid outbreak so I haven't had a chance to dig in.

commented

You're welcome :) Hope you're you're all doing okay, wishing you speedy recoveries!