Overriding config does not work for oauth1 providers
Issue / Motivation:
"laravel/socialite": "^5.5" "socialiteproviders/trello": "^4.1"
As specified in the documentation, you can override the config like this:
$config = new \SocialiteProviders\Manager\Config($clientId, $clientSecret, $redirectUrl, $additionalProviderConfig);
return Socialite::driver('trello')->setConfig($config)->redirect();
Sadly setConfig specified in https://github.com/SocialiteProviders/Manager/blob/master/src/OAuth1/AbstractProvider.php#L149 does only modify the config object, but not the clientCredentials (League\OAuth1\Client\Credentials\ClientCredentialsInterface) inside the server (League\OAuth1\Client\Server\Server)
Expected behavior:
Calling setConfig changes the config of the provider that is later on used by the redirect call
Actual behavior:
Calling setConfig leaves the values inside the OAuth1 Server instance (which seem to be the values that are actually used by
the redirect call) untouched
Steps to reproduce the behavior:
- install
socialiteproviders/trello - try to assign a new config with different redirect uri for example
- redirect call still uses the values from config.php
Proposed solution:
Pseudocode:
#SocialiteProviders\Manager\OAuth1\AbstractProvider
public function setConfig(Config $config){
$this->config = $this->server->setConfig($config);
if($this->server instanceof League\OAuth1\Client\Server\Server){
$credentials = $this->server->getClientCredentials();
$credentials->setIdentifier($config->get()["client_id"]);
$credentials->setSecret($config->get()["client_secret"]);
$credentials->setCallbackUri($config->get()["redirect"]);
}
return $this;
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
is this project dead or is it simply the wrong place to post an issue regarding socialite?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bump
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.