Hesto / multi-auth

Laravel 5.3, 5.4, 5.5, 5.6, 5.7 multi auth package
MIT License
448 stars 146 forks source link

Guard is not redirecting where page was before after login #91

Open ajayexpert opened 7 years ago

ajayexpert commented 7 years ago

Guard is not redirecting where page was before after login

for example :

I am on page : http://laravel.dev/lists

which shows me list of item

<a href="http://laravel.dev/lists/1">Item 1</a>
<a href="http://laravel.dev/lists/2">Item 1</a>
<a href="http://laravel.dev/lists/3">Item 1</a>

but above item can only accessible to authorized user

Issue when i click on Item 1 so if user is not logged in then it goes to http://laravel.dev/login then user proceed to login but after login it must redirect to http://laravel.dev/lists/1 but it is redirecting to http://laravel.dev/home.

I have tried

public function showLoginForm()
{
    session()->put('url.intended',url()->previous());

    // or 

    session()->put('url.intended', url()->current());

    return view('user.auth.login');
}

but above is not working, it is redirecting to http://laravel.dev/lists

laravel own auth is working fine.

but hesto multi-auth is not working

is there any solution for this

Hesto commented 7 years ago

Laravel 5.5?

ajayexpert commented 7 years ago

using Laravel 5.5

mo3auya91 commented 7 years ago

same problem laravel 5.5

LeeGarden commented 6 years ago

same issue with Laravel 5.5. Any have solution, @Hesto ?

ghost commented 6 years ago

I guess this has something to do with the Login controller code as we mention redirect page there. Changing that should fix the issue. I'm not sure, i'll try and let you know if it works.