Merge pull request #6 from bolsunovskyi/issue-5

[issue-5]: implement redirection to prev page after oauth login
This commit is contained in:
Michael Bolsunovskyi 2021-11-30 11:08:05 +02:00 committed by GitHub
commit 6fa1bbd7db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,6 @@ class OAuthController extends Controller
$user = User::where('email','=', $data['email'])->first();
Auth::login($user);

return redirect('/');
return redirect($request->session()->get('url.intended', '/'));
}
}