0

I would like to implement stateless method to Twitter but it seems that it is not available for TwitterProvider class as it returns Call to undefined method Laravel\Socialite\One\TwitterProvider::stateless()

Here is my redirectToProvider method currently.

public function redirectToProvider($socialMedia)
{
    $provider = strtolower($socialMedia);

    return Socialite::driver($provider)->stateless()->redirect();

    throw new NotFoundHttpException;        
}

What is the correct implementation or what do I miss?

alvirbismonte
  • 349
  • 2
  • 7
  • 26

1 Answers1

0

As mentioned by @driesvints from this question #415 I've opened at the Laravel Socialite repository, stateless is unavailable for Twitter since it uses OAuth 1.0.

They already pushed a PR #5661 to update also the Laravel Docs mentioning this specification. Click the link to see the update. Staless Authentication

I would update this answer if whatever my solution would be.

alvirbismonte
  • 349
  • 2
  • 7
  • 26