Support the ongoing development of Laravel.io →
Configuration Authentication Requests
Last updated 2 years ago.
0

I've solved this problem by replacing

return redirect('/home');

with proper json response in RedirectIfAuthenticated.php file :

 public function handle($request, Closure $next, $guard = null)
    {
        if (Auth::guard($guard)->check()) {

            $json = [
                'success' => true,
                'code' => 200,
                'message' => 'You are Logged in.',
            ];
            return \Response::json($json,200);
        }

        return $next($request);
    }
0

Sign in to participate in this thread!

Eventy

Your banner here too?

anonymox anonymox Joined 16 Oct 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.