The-Monkeys-and-MAUD / laravel-google-auth

Laravel Authentication Driver for Google OAuth authentication
43 stars 14 forks source link

Issue with Laravel 4.1.26 #7

Open piernitas opened 10 years ago

piernitas commented 10 years ago

The following error seems to occur everytime the Auth object is called. This only happens as of Laravel 4.1.26:

Symfony \ Component \ Debug \ Exception \ FatalErrorException Class Themonkeys\LaravelGoogleAuth\GoogleUserProvider contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Illuminate\Auth\UserProviderInterface::retrieveByToken, Illuminate\Auth\UserProviderInterface::updateRememberToken)

michaelharper commented 10 years ago

Any update on this? I am experiencing the same.

chrishutchinson commented 10 years ago

Looks like Laravel 4.1 added some new functions to the UserProviderInterface class.

Can be fixed by adding:

public function retrieveByToken($identifier, $token){
    // this method doesn't make sense for Google auth
    return false;
}

public function updateRememberToken(UserInterface $user, $token){
    // this method doesn't make sense for Google auth
    return false;
}

to the GoogleUserProvider class in laravel-google-auth/src/Themonkeys/LaravelGoogleAuth/GoogleUserProvider.php

If verified this fixes it for others I can do a pull request. I can't envisage these functions would be used in any way with the Google Auth mechanism.

chrishutchinson commented 10 years ago

As a follow up, looks like someone has already done a pull request for this here, https://github.com/TheMonkeys/laravel-google-auth/pull/8.

Will await to hear from the owner of the repo and see if they are active.