-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
type:enhancementEnhancementEnhancement
Description
Proposed new feature or change
Hi,
There are use cases in which additional OAuth parameters may need to be passed in the URL. For example Google oauth with multiple accounts choices may simply use by default the account that had access previously granted instead of offering to pick another account:
'authClientCollection' => [
'class' => \yii\authclient\Collection::class,
'clients' => [
'google' => [
'class' => \yii\authclient\clients\Google::class,
'clientId' => 'XXX',
'clientSecret' => 'YYY',
'scope' => 'openid email profile',
'authParams' => [
'prompt' => 'select_account', // force account chooser
// optional: 'access_type' => 'offline', 'include_granted_scopes' => 'true'
],
], ...I looked through code and additional 'params' are merged in different url building methods (like buildAuthUrl(array $params = [])) with the default auth parameters, however, there is no way to pass those params to the existing methods from the component config.
Could we add/parse/merge an 'authParams' array in config?
Reactions are currently unavailable
Metadata
Metadata
Labels
type:enhancementEnhancementEnhancement