Fixed Additional Parameters for handleAuthorization function in AbstractProvider

robdog

Well-known member
Affected version
2.x+
This is not necessarily a bug and maybe an enhancement request. But I was wondering if we can add $additionalAuthParams as a function parameter with a default value of an empty array instead of initializing it within the function?

This came about because I wanted to force account selection for OAuth2 external accounts. I had to change a few lines of the core code to this:
PHP:
        $additionalAuthParams = [
            'prompt' => 'select_account'
        ];

Now there might be another way to do this, but it would be nice to be able to pass this in IF this is the right place.

Thanks.
 
We've added a new getAdditionalAuthParams method which defaults to an empty array.

If your changs apply to all handlers then you can apply them in AbstractProvider otherwise you can add the getAdditionalAuthParams method to any of the concrete handlers with your changes to apply them to specific handlers.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.8).

Change log:
Allow connected account providers to provide additional auth params
There may be a delay before changes are rolled out to the XenForo Community.
 
@Chris D this does appear to be working at the individual provider level, but did you say I should be able to extend the abstract class as well?

Can't seem to get it working for the abstract class.
 
Back
Top Bottom