replace custom code in AccessToken with Vkontakte::$uidKey
parent
e18c99c999
commit
7446829c3b
|
@ -7,8 +7,7 @@ use League\OAuth2\Client\Token\AccessToken;
|
||||||
|
|
||||||
class Vkontakte extends AbstractProvider
|
class Vkontakte extends AbstractProvider
|
||||||
{
|
{
|
||||||
public $scopes = [];
|
public $uidKey = 'user_id';
|
||||||
public $responseType = 'json';
|
|
||||||
|
|
||||||
public function urlAuthorize()
|
public function urlAuthorize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,9 +46,6 @@ class AccessToken
|
||||||
// Some providers (not many) give the uid here, so lets take it
|
// Some providers (not many) give the uid here, so lets take it
|
||||||
isset($options['uid']) and $this->uid = $options['uid'];
|
isset($options['uid']) and $this->uid = $options['uid'];
|
||||||
|
|
||||||
// Vkontakte uses user_id instead of uid
|
|
||||||
isset($options['user_id']) and $this->uid = $options['user_id'];
|
|
||||||
|
|
||||||
// Mailru uses x_mailru_vid instead of uid
|
// Mailru uses x_mailru_vid instead of uid
|
||||||
isset($options['x_mailru_vid']) and $this->uid = $options['x_mailru_vid'];
|
isset($options['x_mailru_vid']) and $this->uid = $options['x_mailru_vid'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue