Skip to content

Addressing PR comments#74

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/add-auth-params-to-auth-client
Draft

Addressing PR comments#74
Copilot wants to merge 6 commits intomasterfrom
copilot/add-auth-params-to-auth-client

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 23, 2025

Original prompt

This section details on the original issue you should resolve

<issue_title>Adding 'authParams' to authClientCollection clients</issue_title>
<issue_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?

</issue_description>

<agent_instructions>Make it available for any client. Do not break backwards compatibility.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@samdark Do you mean auth URL? @samdark Thanks for explaining.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Copilot AI changed the title [WIP] Add authParams to authClientCollection clients Add authParams configuration support for OAuth2 clients Dec 23, 2025
Copilot AI requested a review from samdark December 23, 2025 18:07
@samdark
Copy link
Copy Markdown
Member

samdark commented Apr 13, 2026

@claude[agent] rebase. Re-verify. Fix mutation tests if these concern the feature.

vjik and others added 4 commits April 13, 2026 21:54
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
@Claude
Copy link
Copy Markdown
Contributor

Claude AI commented Apr 13, 2026

@claude[agent] rebase. Re-verify. Fix mutation tests if these concern the feature.

Rebased on master and added getter test for better mutation coverage (cddf973).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • asset-packagist.org
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u5m1XF /usr/bin/composer install --no-interaction /home/REDACTED/.dotnet/tools/git get --global rgo/bin/git git rev-�� --abbrev-ref HEAD /usr/bin/base64 --global ame k/_temp/ghcca-node/node/bin/node base64 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Claude Claude AI changed the title Add authParams configuration support for OAuth2 clients Addressing PR comments Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding 'authParams' to authClientCollection clients

4 participants