Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Sep 26, 2021
1 parent 1f57d7e commit b90406e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Providers/OpenWeWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ public function withSuiteAccessToken(string $suiteAccessToken): OpenWeWork

public function getAuthUrl(): string
{
$queries = [
$queries = \array_filter([
'appid' => $this->getClientId(),
'redirect_uri' => $this->redirectUrl,
'response_type' => 'code',
'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
'state' => $this->state,
];
'agentid' => $this->agentId,
]);

if ((\in_array('snsapi_userinfo', $this->scopes) || \in_array('snsapi_privateinfo', $this->scopes)) && empty($this->agentId)) {
throw new InvalidArgumentException('agentid is required when scopes is snsapi_userinfo or snsapi_privateinfo.');
Expand Down

0 comments on commit b90406e

Please sign in to comment.