Closed erastovpavel closed 9 years ago
Such change makes no sense. If you with any custom parameter passed to created auth URL you should invoke buildAuthUrl()
manually passing them via $params
argument.
You may also try to specify extra params setting them directly at authUrl
:
'google' => [
'class' => 'yii\authclient\clients\GoogleOAuth',
'authUrl' => 'https://accounts.google.com/o/oauth2/auth?access_type=offline',
...
],
I cant find how we can input my params in public function buildAuthUrl in /vendor/yiisoft/yii2-authclient/OAuth2.php line 59.
For example for Google OAuth2 if we wanted to get "request_token" we must write something like: 'access_type' => 'offline' In $params array of function "buildAuthUrl":
So I extend GoogleOAuth, added buildAuthParams, which we can wtite in config:
And extended GoogleOAuth code is: