Support the ongoing development of Laravel.io →
Authentication
Last updated 1 month ago.
0

Hi, try this:

public function redirect($provider)
{
    $redirectUrl = "callback-url";
    return Socialite::with($provider)->redirectUrl($redirectUrl)->redirect();
}
0

@aaron94 this works well for Facebook, but it seems as if you cannot set redirectUrl when using Twitter provider. Any ideas?

0

@AmbitionPHP try this way:

public function socialLogin($loginFrom){
  return Socialite::driver('facebook') >redirectUrl('http://your-domain.com?data=123')->redirect();
}
Last updated 4 years ago.
1

Sign in to participate in this thread!

Cloudways

Your banner here too?

leartgjoni leartgjoni leartgjoni Joined 28 Jul 2016

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.