Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years 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 6 years ago.

qwertynik liked this reply

1

Sign in to participate in this thread!

Eventy

Your banner here too?

leartgjoni leartgjoni Joined 28 Jul 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.