N
N
Nikolino2018-06-14 19:47:19
Laravel
Nikolino, 2018-06-14 19:47:19

How to return the user to the page after logging in via Socialite?

From the post page where you can leave a comment, I go directly to auth/vkontakte
Auth\[email protected]
To write down the url, I do:

Session::flash('url',Request::server('HTTP_REFERER'));

After authorization, I do If I'm in the social. network is logged, it returns immediately to the post URL. If I do it from a clean browser, then it redirects to the social login page. network (in the same window), after entering the login / pass. Returns: (1/1) UnexpectedValueException The Response content must be a string or object implementing __toString(), "object" given. in Response.php line 388 Why is that?
return redirect(Session::get('url'));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2018-06-14
@Tantacula

Well, look further in the logs, where the error from your code comes from and what you give as an answer there and give what the framework asks you to - a string or an object that implements the string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question