Nodge / yii-eauth

EAuth extension allows to authenticate users by the OpenID, OAuth 1.0 and OAuth 2.0 providers.
BSD 2-Clause "Simplified" License
329 stars 114 forks source link

Facebook service errorParam and errorDescriptionParam are invalid #78

Closed AidasK closed 10 years ago

AidasK commented 10 years ago

https://github.com/Nodge/yii-eauth/blob/master/services/FacebookOAuthService.php#L34

It seems oauth2 on facebook uses same default params as others:

protected $errorParam = 'error';
protected $errorDescriptionParam = 'error_description';

Although, i haven't looked at facebook documentation, but this fixes error handling.

Facebook response sample:

service=facebook&error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied
Nodge commented 10 years ago

It has been fixed already. Take a look at FacebookOAuthService.php.

AidasK commented 10 years ago

No it is not, https://github.com/Nodge/yii-eauth/blob/master/services/FacebookOAuthService.php#L34 this should be set to error instead. And this - https://github.com/Nodge/yii-eauth/blob/master/services/FacebookOAuthService.php#L35 should be set to error_description.

This causes some errors while trying to authenticate and authentication is canceled.

Nodge commented 10 years ago

You are right. I looked at my local project where it was fixed... :)

Nodge commented 10 years ago

Done.