laravel socialite doesnt take GET parameter to redirect on same page
<p>I have a problem with one Laravel plugin
its called Socialite
it allows my site users to loggin with facebook, twitter etc
i need some help</p>
<p>the problem is that after login it redirects to index page and the page visitor initiated login
<code>ogin url /login?redirect=https://www...</code>
socialite doesnt take this GET parameter
default laravel login works with this parameter, but not socialite</p>
<p>i think it doesnt support redirect, because callback URL is set static in config
I cannot figure out how to modify it to take GET paramenter with customs URLs</p>
<pre class="lang-php prettyprint-override"><code>class SocialAuthController extends Controller {
    public function redirect() {
        return Socialite::driver('facebook')-&gt;redirect();
    }

    public function callback(SocialAccountService $service) {
        $user = $service-&gt;createOrGetUser(Socialite::driver('facebook')-&gt;user()); auth()-&gt;login($user);
        return redirect()-&gt;to('/home');
    }
}
</code></pre>
<p>How can i put a dynamic link to this intead of /home SO that it redirects me to the same page where i was before log-in.
redirect()-&gt;to('/home')</p>
<p>Laravel Socialite plugin after login with Facebook or Twitter redirects to:</p>
<p>SocialAuthController.php</p>
<pre class="lang-php prettyprint-override"><code>...
public function callback(SocialAccountService $service, $provider)
....
return redirect()-&gt;to('/');
</code></pre>
<p>I want to redirect visitor to page where login was initiated and not static page '/'</p>
<p>My login page receives GET parameter <code>/login?redirect=http://www.website.com/dynamic_url</code></p>
<p>Please make code changes that Socialite plugin redirects after login to dynamically set redirect URL.</p>