|
|
|
@ -65,7 +65,8 @@ class Application extends ServiceContainer
@@ -65,7 +65,8 @@ class Application extends ServiceContainer
|
|
|
|
|
string $appId, |
|
|
|
|
string $refreshToken = null, |
|
|
|
|
AccessToken $accessToken = null |
|
|
|
|
): OfficialAccount { |
|
|
|
|
): OfficialAccount |
|
|
|
|
{ |
|
|
|
|
$application = new OfficialAccount( |
|
|
|
|
$this->getAuthorizerConfig($appId, $refreshToken), |
|
|
|
|
$this->getReplaceServices($accessToken) + [ |
|
|
|
@ -84,7 +85,9 @@ class Application extends ServiceContainer
@@ -84,7 +85,9 @@ class Application extends ServiceContainer
|
|
|
|
|
$socialite->withComponent( |
|
|
|
|
[ |
|
|
|
|
'id' => $this['config']['app_id'], |
|
|
|
|
'token' => fn () => $this['access_token']->getToken()['component_access_token'], |
|
|
|
|
'token' => function () { |
|
|
|
|
return $this['access_token']->getToken()['component_access_token']; |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
@ -108,7 +111,8 @@ class Application extends ServiceContainer
@@ -108,7 +111,8 @@ class Application extends ServiceContainer
|
|
|
|
|
string $appId, |
|
|
|
|
string $refreshToken = null, |
|
|
|
|
AccessToken $accessToken = null |
|
|
|
|
): MiniProgram { |
|
|
|
|
): MiniProgram |
|
|
|
|
{ |
|
|
|
|
return new MiniProgram( |
|
|
|
|
$this->getAuthorizerConfig($appId, $refreshToken), |
|
|
|
|
$this->getReplaceServices($accessToken) + [ |
|
|
|
|