mckenziearts / laravel-oauth

:octocat: Social OAuth authentication for Laravel 5 & 6. Drivers: Facebook, Twitter, Google, LinkedIn, Github, Bitbucket.
Other
52 stars 6 forks source link

Incomplete instructions / unable to install successfully #4

Closed connecteev closed 5 years ago

connecteev commented 5 years ago

Doesnt work...I went through the install steps. I see this when I try to log in with linkedin:

http://127.0.0.1:8000/auth/linkedin

BadMethodCallException
Method App\Http\Controllers\Auth\LoginController::redirectToProvider does not exist.

Also where is the configuration for these providers?

mckenziearts commented 5 years ago

You have forgotten the OAuth trait. You must add this to your LoginController.

https://github.com/mckenziearts/laravel-oauth#usage

use Mckenziearts\LaravelOAuth\Traits\OAuthSocialite;

class LoginController extends Controller
{
    use OAuthSocialite;
    ..
connecteev commented 5 years ago

Still doesnt work..now I see this

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_RECOVERABLE_ERROR)
Argument 1 passed to Laravel\Socialite\SocialiteManager::formatRedirectUrl() must be of the type array, null given, called in /Users/kunalpunjabi/Code/EXPLORATIONS/AUTH/mckenziearts_laravel_oauth/vendor/laravel/socialite/src/SocialiteManager.php on line 126

Anyway i already have most of the social logins working from other repos...was trying to make the readme for yours easier to go through. Btw do you have advanced scopes for google / linkedin / twitter / facebook figured out? I'm trying to get the username, etc from them but most ofthem dont send it with the default scope.